package o; import android.app.Activity; import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.Executor; import java.util.concurrent.locks.ReentrantLock; import o.C13395fZS; /* renamed from: o.cck, reason: case insensitive filesystem */ /* loaded from: classes.dex */ public final class C6827cck implements InterfaceC11781eln { private final InterfaceC11781eln a; private final ReentrantLock b; private final Map, InterfaceC15034gfD> e; public C6827cck(InterfaceC11781eln interfaceC11781eln) { C14957gcv.e(interfaceC11781eln, ""); this.a = interfaceC11781eln; this.b = new ReentrantLock(); this.e = new LinkedHashMap(); } public final void Cw_(Activity activity, Executor executor, QUU quu) { C14957gcv.e(activity, ""); C14957gcv.e(executor, ""); C14957gcv.e(quu, ""); InterfaceC15089ggq CY_ = this.a.CY_(activity); ReentrantLock reentrantLock = this.b; reentrantLock.lock(); try { if (this.e.get(quu) == null) { ExecutorC15047gfg executorC15047gfg = executor instanceof ExecutorC15047gfg ? (ExecutorC15047gfg) executor : null; if (executorC15047gfg != null) { AbstractC15004geU abstractC15004geU = executorC15047gfg.e; } C15061gfu c15061gfu = new C15061gfu(executor); if (c15061gfu.get(InterfaceC15034gfD.d) == null) { c15061gfu = c15061gfu.plus(new gfE()); } this.e.put(quu, C15028gew.e(new C15070ggK(c15061gfu), C14908gbj.e, geY.DEFAULT, new RVV(CY_, quu, null))); } C14866gag c14866gag = C14866gag.c; } finally { reentrantLock.unlock(); } } public final void c(QUU quu) { C14957gcv.e(quu, ""); ReentrantLock reentrantLock = this.b; reentrantLock.lock(); try { InterfaceC15034gfD interfaceC15034gfD = this.e.get(quu); if (interfaceC15034gfD != null) { interfaceC15034gfD.d(null); } this.e.remove(quu); } finally { reentrantLock.unlock(); } } /* renamed from: o.cck$RVV */ /* loaded from: classes.dex */ static final class RVV extends AbstractC14924gbz implements InterfaceC14937gcb, Object> { private int a; final QUU b; final InterfaceC15089ggq e; /* JADX INFO: Add missing generic type declarations: [T] */ /* renamed from: o.cck$RVV$HBt */ /* loaded from: classes.dex */ public static final class HBt implements InterfaceC15095ggw { final QUU d; public HBt(QUU quu) { this.d = quu; } @Override // o.InterfaceC15095ggw public final Object a(T t, InterfaceC14907gbi interfaceC14907gbi) { this.d.accept(t); return C14866gag.c; } } @Override // o.InterfaceC14937gcb public final /* synthetic */ Object invoke(geZ gez, InterfaceC14907gbi interfaceC14907gbi) { return ((RVV) create(gez, interfaceC14907gbi)).invokeSuspend(C14866gag.c); } @Override // o.AbstractC14913gbo public final Object invokeSuspend(Object obj) { EnumC14910gbl enumC14910gbl = EnumC14910gbl.COROUTINE_SUSPENDED; int i = this.a; if (i != 0) { if (i != 1) { throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } if (obj instanceof C13395fZS.LWm) { throw ((C13395fZS.LWm) obj).d; } } else if (!(obj instanceof C13395fZS.LWm)) { this.a = 1; if (this.e.c(new HBt(this.b), this) == enumC14910gbl) { return enumC14910gbl; } } else { throw ((C13395fZS.LWm) obj).d; } return C14866gag.c; } @Override // o.AbstractC14913gbo public final InterfaceC14907gbi create(Object obj, InterfaceC14907gbi interfaceC14907gbi) { return new RVV(this.e, this.b, interfaceC14907gbi); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ /* JADX WARN: Multi-variable type inference failed */ RVV(InterfaceC15089ggq interfaceC15089ggq, QUU quu, InterfaceC14907gbi interfaceC14907gbi) { super(2, interfaceC14907gbi); this.e = interfaceC15089ggq; this.b = quu; } } @Override // o.InterfaceC11781eln public final InterfaceC15089ggq CY_(Activity activity) { C14957gcv.e(activity, ""); return this.a.CY_(activity); } }