package c.f.j.e; import c.f.c.a; import c.f.j.c.f; import c.f.j.c.i; import c.f.j.c.w; import c.f.j.j.c; import c.f.j.k.b; import c.f.j.k.d; import c.f.j.k.e; import c.f.j.p.b0; import c.f.j.p.c1; import c.f.j.p.f1; import c.f.j.p.v0; import com.airbnb.lottie.parser.AnimatableValueParser; import com.facebook.cache.common.CacheKey; import com.facebook.common.internal.Supplier; import com.facebook.common.memory.PooledByteBuffer; import com.facebook.common.references.CloseableReference; import com.facebook.datasource.DataSource; import com.facebook.imagepipeline.request.ImageRequest; import java.util.Set; import java.util.concurrent.CancellationException; import java.util.concurrent.atomic.AtomicLong; /* compiled from: ImagePipeline */ public class h { public final p a; public final e b; /* renamed from: c reason: collision with root package name */ public final d f442c; public final Supplier d; public final w e; public final w f; public final i g; public final Supplier h; public AtomicLong i = new AtomicLong(); public final Supplier j; public final a k; public final j l; static { new CancellationException("Prefetching is not enabled"); } public h(p pVar, Set set, Set set2, Supplier supplier, w wVar, w wVar2, f fVar, f fVar2, i iVar, f1 f1Var, Supplier supplier2, Supplier supplier3, a aVar, j jVar) { this.a = pVar; this.b = new c.f.j.k.c(set); this.f442c = new b(set2); this.d = supplier; this.e = wVar; this.f = wVar2; this.g = iVar; this.h = supplier2; this.j = null; this.k = null; this.l = jVar; } public DataSource> a(ImageRequest imageRequest, Object obj, ImageRequest.c cVar, e eVar, String str) { try { return b(this.a.c(imageRequest), imageRequest, cVar, obj, eVar, str); } catch (Exception e) { return AnimatableValueParser.Z0(e); } } /* JADX WARNING: Removed duplicated region for block: B:13:0x0051 */ /* JADX WARNING: Removed duplicated region for block: B:17:0x006d A[Catch:{ Exception -> 0x009b, all -> 0x0099 }] */ public final DataSource> b(v0> v0Var, ImageRequest imageRequest, ImageRequest.c cVar, Object obj, e eVar, String str) { e eVar2; a aVar; boolean z2; c.f.j.k.c cVar2; c.f.j.r.b.b(); if (eVar == null) { e eVar3 = imageRequest.r; if (eVar3 == null) { eVar2 = this.b; b0 b0Var = new b0(eVar2, this.f442c); aVar = this.k; if (aVar != null) { aVar.a(obj, false); } ImageRequest.c f = ImageRequest.c.f(imageRequest.m, cVar); String valueOf = String.valueOf(this.i.getAndIncrement()); if (!imageRequest.f) { if (c.f.d.l.b.e(imageRequest.f2264c)) { z2 = false; c1 c1Var = new c1(imageRequest, valueOf, str, b0Var, obj, f, false, z2, imageRequest.l, this.l); c.f.j.r.b.b(); c.f.j.f.d dVar = new c.f.j.f.d(v0Var, c1Var, b0Var); c.f.j.r.b.b(); return dVar; } } z2 = true; c1 c1Var = new c1(imageRequest, valueOf, str, b0Var, obj, f, false, z2, imageRequest.l, this.l); c.f.j.r.b.b(); c.f.j.f.d dVar = new c.f.j.f.d(v0Var, c1Var, b0Var); c.f.j.r.b.b(); return dVar; } cVar2 = new c.f.j.k.c(this.b, eVar3); } else { e eVar4 = imageRequest.r; if (eVar4 == null) { eVar2 = new c.f.j.k.c(this.b, eVar); b0 b0Var = new b0(eVar2, this.f442c); aVar = this.k; if (aVar != null) { } ImageRequest.c f = ImageRequest.c.f(imageRequest.m, cVar); String valueOf = String.valueOf(this.i.getAndIncrement()); if (!imageRequest.f) { } z2 = true; c1 c1Var = new c1(imageRequest, valueOf, str, b0Var, obj, f, false, z2, imageRequest.l, this.l); c.f.j.r.b.b(); c.f.j.f.d dVar = new c.f.j.f.d(v0Var, c1Var, b0Var); c.f.j.r.b.b(); return dVar; } cVar2 = new c.f.j.k.c(this.b, eVar, eVar4); } eVar2 = cVar2; b0 b0Var = new b0(eVar2, this.f442c); aVar = this.k; if (aVar != null) { } try { ImageRequest.c f = ImageRequest.c.f(imageRequest.m, cVar); String valueOf = String.valueOf(this.i.getAndIncrement()); if (!imageRequest.f) { } z2 = true; c1 c1Var = new c1(imageRequest, valueOf, str, b0Var, obj, f, false, z2, imageRequest.l, this.l); c.f.j.r.b.b(); c.f.j.f.d dVar = new c.f.j.f.d(v0Var, c1Var, b0Var); c.f.j.r.b.b(); return dVar; } catch (Exception e) { return AnimatableValueParser.Z0(e); } finally { c.f.j.r.b.b(); } } }