package o; import androidx.lifecycle.LiveData; import java.lang.ref.WeakReference; import java.util.LinkedHashMap; import java.util.Map; /* renamed from: o.gup, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C15589gup extends VKL { private final HeN>> b = new HeN<>(); /* JADX WARN: Multi-variable type inference failed */ public final void c(String str, gur gurVar) { C14957gcv.e(str, ""); C14957gcv.e(gurVar, ""); Object obj = b().d; if (obj == LiveData.c) { obj = null; } Map map = (Map) obj; if (map != null) { map.put(str, new C15585gul(gurVar)); } HeN>> b = b(); Object obj2 = b.d; b.a((HeN>>) (obj2 != LiveData.c ? obj2 : null)); } /* renamed from: o.gup$LWm */ /* loaded from: classes6.dex */ public static final class LWm implements zBc { private WeakReference> a; private WeakReference> b; private String d; private WeakReference> e; @Override // o.zBc public final /* synthetic */ void onChanged(Object obj) { InterfaceC14890gbN interfaceC14890gbN; WeakReference> weakReference; InterfaceC14890gbN interfaceC14890gbN2; C15585gul c15585gul = (C15585gul) ((Map) obj).get(this.d); T t = (T) null; if (c15585gul != null) { if (!c15585gul.e) { c15585gul.e = true; t = c15585gul.d; } t = (T) ((gur) t); } int i = t == null ? -1 : Sts.b[t.ordinal()]; if (i == 1) { InterfaceC14890gbN interfaceC14890gbN3 = this.a.get(); if (interfaceC14890gbN3 != null) { interfaceC14890gbN3.invoke(); return; } return; } if (i != 2) { if (i != 3 || (weakReference = this.b) == null || (interfaceC14890gbN2 = weakReference.get()) == null) { return; } interfaceC14890gbN2.invoke(); return; } WeakReference> weakReference2 = this.e; if (weakReference2 == null || (interfaceC14890gbN = weakReference2.get()) == null) { return; } interfaceC14890gbN.invoke(); } /* renamed from: o.gup$LWm$Sts */ /* loaded from: classes6.dex */ public final /* synthetic */ class Sts { public static final int[] b; static { int[] iArr = new int[gur.values().length]; iArr[gur.GRANTED.ordinal()] = 1; iArr[gur.DENIED.ordinal()] = 2; iArr[gur.DENIED_AND_DISABLED.ordinal()] = 3; b = iArr; } } public LWm(String str, WeakReference> weakReference, WeakReference> weakReference2, WeakReference> weakReference3) { this.d = str; this.a = weakReference; this.e = weakReference2; this.b = weakReference3; } } /* JADX INFO: Access modifiers changed from: package-private */ public final HeN>> b() { Object obj = this.b.d; if (obj == LiveData.c) { obj = null; } if (((Map) obj) == null) { this.b.a((HeN>>) new LinkedHashMap()); } return this.b; } }