2021-08-09 22:50:52 +00:00
|
|
|
package c.f.j.p;
|
|
|
|
|
|
|
|
import c.f.j.d.a;
|
|
|
|
import c.f.j.j.e;
|
|
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
|
|
import com.facebook.cache.common.CacheKey;
|
|
|
|
import com.facebook.imagepipeline.request.ImageRequest;
|
|
|
|
import com.facebook.imagepipeline.request.ImageRequestBuilder;
|
|
|
|
import java.util.concurrent.CancellationException;
|
|
|
|
import z.c;
|
|
|
|
import z.g;
|
|
|
|
/* compiled from: PartialDiskCacheProducer */
|
|
|
|
public class o0 implements c<e, Void> {
|
|
|
|
public final /* synthetic */ y0 a;
|
|
|
|
public final /* synthetic */ w0 b;
|
|
|
|
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
2021-08-18 07:29:27 +00:00
|
|
|
public final /* synthetic */ l f495c;
|
2021-08-09 22:50:52 +00:00
|
|
|
public final /* synthetic */ CacheKey d;
|
|
|
|
public final /* synthetic */ q0 e;
|
|
|
|
|
|
|
|
public o0(q0 q0Var, y0 y0Var, w0 w0Var, l lVar, CacheKey cacheKey) {
|
|
|
|
this.e = q0Var;
|
|
|
|
this.a = y0Var;
|
|
|
|
this.b = w0Var;
|
2021-08-18 07:29:27 +00:00
|
|
|
this.f495c = lVar;
|
2021-08-09 22:50:52 +00:00
|
|
|
this.d = cacheKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [z.g] */
|
|
|
|
@Override // z.c
|
|
|
|
public Void a(g<e> gVar) throws Exception {
|
|
|
|
boolean z2;
|
|
|
|
e eVar;
|
|
|
|
synchronized (gVar.e) {
|
|
|
|
z2 = gVar.g;
|
|
|
|
}
|
|
|
|
boolean z3 = false;
|
|
|
|
if (z2 || (gVar.e() && (gVar.d() instanceof CancellationException))) {
|
|
|
|
this.a.d(this.b, "PartialDiskCacheProducer", null);
|
2021-08-18 07:29:27 +00:00
|
|
|
this.f495c.d();
|
2021-08-09 22:50:52 +00:00
|
|
|
} else if (gVar.e()) {
|
|
|
|
this.a.k(this.b, "PartialDiskCacheProducer", gVar.d(), null);
|
2021-08-18 07:29:27 +00:00
|
|
|
q0.c(this.e, this.f495c, this.b, this.d, null);
|
2021-08-09 22:50:52 +00:00
|
|
|
} else {
|
|
|
|
synchronized (gVar.e) {
|
|
|
|
eVar = gVar.h;
|
|
|
|
}
|
|
|
|
e eVar2 = eVar;
|
|
|
|
if (eVar2 != null) {
|
|
|
|
y0 y0Var = this.a;
|
|
|
|
w0 w0Var = this.b;
|
|
|
|
y0Var.j(w0Var, "PartialDiskCacheProducer", q0.d(y0Var, w0Var, true, eVar2.f()));
|
|
|
|
int f = eVar2.f() - 1;
|
|
|
|
AnimatableValueParser.j(Boolean.valueOf(f > 0));
|
|
|
|
eVar2.r = new a(0, f);
|
|
|
|
int f2 = eVar2.f();
|
|
|
|
ImageRequest e = this.b.e();
|
|
|
|
a aVar = e.k;
|
|
|
|
if (aVar != null && aVar.a >= 0 && f >= aVar.b) {
|
|
|
|
this.b.i("disk", "partial");
|
|
|
|
this.a.c(this.b, "PartialDiskCacheProducer", true);
|
2021-08-18 07:29:27 +00:00
|
|
|
this.f495c.b(eVar2, 9);
|
2021-08-09 22:50:52 +00:00
|
|
|
} else {
|
2021-08-18 07:29:27 +00:00
|
|
|
this.f495c.b(eVar2, 8);
|
|
|
|
ImageRequestBuilder b = ImageRequestBuilder.b(e.f2225c);
|
2021-08-09 22:50:52 +00:00
|
|
|
b.e = e.h;
|
|
|
|
b.o = e.k;
|
|
|
|
b.f = e.b;
|
|
|
|
b.h = e.g;
|
|
|
|
b.b = e.m;
|
|
|
|
b.j = e.q;
|
|
|
|
b.g = e.f;
|
|
|
|
b.i = e.l;
|
2021-08-18 07:29:27 +00:00
|
|
|
b.f2227c = e.i;
|
2021-08-09 22:50:52 +00:00
|
|
|
b.n = e.r;
|
|
|
|
b.d = e.j;
|
|
|
|
b.m = e.p;
|
2021-08-18 07:29:27 +00:00
|
|
|
b.p = e.f2226s;
|
2021-08-09 22:50:52 +00:00
|
|
|
int i = f2 - 1;
|
|
|
|
if (i >= 0) {
|
|
|
|
z3 = true;
|
|
|
|
}
|
|
|
|
AnimatableValueParser.j(Boolean.valueOf(z3));
|
|
|
|
b.o = new a(i, Integer.MAX_VALUE);
|
2021-08-18 07:29:27 +00:00
|
|
|
q0.c(this.e, this.f495c, new c1(b.a(), this.b), this.d, eVar2);
|
2021-08-09 22:50:52 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
y0 y0Var2 = this.a;
|
|
|
|
w0 w0Var2 = this.b;
|
|
|
|
y0Var2.j(w0Var2, "PartialDiskCacheProducer", q0.d(y0Var2, w0Var2, false, 0));
|
2021-08-18 07:29:27 +00:00
|
|
|
q0.c(this.e, this.f495c, this.b, this.d, eVar2);
|
2021-08-09 22:50:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|