2021-12-17 21:59:34 +00:00
|
|
|
package b.f.j.p;
|
2021-07-24 02:37:17 +00:00
|
|
|
|
2021-12-17 21:59:34 +00:00
|
|
|
import b.c.a.a0.d;
|
|
|
|
import b.f.j.d.a;
|
|
|
|
import b.f.j.j.e;
|
2021-07-24 02:37:17 +00:00
|
|
|
import com.facebook.cache.common.CacheKey;
|
|
|
|
import com.facebook.imagepipeline.request.ImageRequest;
|
|
|
|
import com.facebook.imagepipeline.request.ImageRequestBuilder;
|
|
|
|
import java.util.concurrent.CancellationException;
|
2021-11-02 06:38:17 +00:00
|
|
|
import z.c;
|
|
|
|
import z.g;
|
2021-07-24 02:37:17 +00:00
|
|
|
/* compiled from: PartialDiskCacheProducer */
|
|
|
|
public class o0 implements c<e, Void> {
|
|
|
|
public final /* synthetic */ y0 a;
|
|
|
|
|
2021-12-17 21:59:34 +00:00
|
|
|
/* renamed from: b reason: collision with root package name */
|
|
|
|
public final /* synthetic */ w0 f618b;
|
|
|
|
public final /* synthetic */ l c;
|
2021-07-24 02:37:17 +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;
|
2021-12-17 21:59:34 +00:00
|
|
|
this.f618b = w0Var;
|
|
|
|
this.c = lVar;
|
2021-07-24 02:37:17 +00:00
|
|
|
this.d = cacheKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
2021-11-02 06:38:17 +00:00
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [z.g] */
|
|
|
|
@Override // z.c
|
2021-07-24 02:37:17 +00:00
|
|
|
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))) {
|
2021-12-17 21:59:34 +00:00
|
|
|
this.a.d(this.f618b, "PartialDiskCacheProducer", null);
|
|
|
|
this.c.d();
|
2021-07-24 02:37:17 +00:00
|
|
|
} else if (gVar.e()) {
|
2021-12-17 21:59:34 +00:00
|
|
|
this.a.k(this.f618b, "PartialDiskCacheProducer", gVar.d(), null);
|
|
|
|
q0.c(this.e, this.c, this.f618b, this.d, null);
|
2021-07-24 02:37:17 +00:00
|
|
|
} else {
|
|
|
|
synchronized (gVar.e) {
|
|
|
|
eVar = gVar.h;
|
|
|
|
}
|
|
|
|
e eVar2 = eVar;
|
|
|
|
if (eVar2 != null) {
|
|
|
|
y0 y0Var = this.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
w0 w0Var = this.f618b;
|
2021-07-24 02:37:17 +00:00
|
|
|
y0Var.j(w0Var, "PartialDiskCacheProducer", q0.d(y0Var, w0Var, true, eVar2.f()));
|
|
|
|
int f = eVar2.f() - 1;
|
2021-11-05 06:48:17 +00:00
|
|
|
d.i(Boolean.valueOf(f > 0));
|
2021-12-17 21:59:34 +00:00
|
|
|
eVar2.f578s = new a(0, f);
|
2021-07-24 02:37:17 +00:00
|
|
|
int f2 = eVar2.f();
|
2021-12-17 21:59:34 +00:00
|
|
|
ImageRequest e = this.f618b.e();
|
2021-07-24 02:37:17 +00:00
|
|
|
a aVar = e.k;
|
2021-12-17 21:59:34 +00:00
|
|
|
if (aVar != null && aVar.a >= 0 && f >= aVar.f552b) {
|
|
|
|
this.f618b.i("disk", "partial");
|
|
|
|
this.a.c(this.f618b, "PartialDiskCacheProducer", true);
|
|
|
|
this.c.b(eVar2, 9);
|
2021-07-24 02:37:17 +00:00
|
|
|
} else {
|
2021-12-17 21:59:34 +00:00
|
|
|
this.c.b(eVar2, 8);
|
|
|
|
ImageRequestBuilder b2 = ImageRequestBuilder.b(e.c);
|
|
|
|
b2.e = e.h;
|
|
|
|
b2.o = e.k;
|
2021-12-20 07:27:17 +00:00
|
|
|
b2.f = e.f2861b;
|
2021-12-17 21:59:34 +00:00
|
|
|
b2.h = e.g;
|
2021-12-20 07:27:17 +00:00
|
|
|
b2.f2863b = e.m;
|
2021-12-17 21:59:34 +00:00
|
|
|
b2.j = e.q;
|
|
|
|
b2.g = e.f;
|
|
|
|
b2.i = e.l;
|
|
|
|
b2.c = e.i;
|
|
|
|
b2.n = e.r;
|
|
|
|
b2.d = e.j;
|
|
|
|
b2.m = e.p;
|
2021-12-20 07:27:17 +00:00
|
|
|
b2.p = e.f2862s;
|
2021-07-24 02:37:17 +00:00
|
|
|
int i = f2 - 1;
|
|
|
|
if (i >= 0) {
|
|
|
|
z3 = true;
|
|
|
|
}
|
2021-11-05 06:48:17 +00:00
|
|
|
d.i(Boolean.valueOf(z3));
|
2021-12-17 21:59:34 +00:00
|
|
|
b2.o = new a(i, Integer.MAX_VALUE);
|
|
|
|
q0.c(this.e, this.c, new c1(b2.a(), this.f618b), this.d, eVar2);
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
y0 y0Var2 = this.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
w0 w0Var2 = this.f618b;
|
2021-07-24 02:37:17 +00:00
|
|
|
y0Var2.j(w0Var2, "PartialDiskCacheProducer", q0.d(y0Var2, w0Var2, false, 0));
|
2021-12-17 21:59:34 +00:00
|
|
|
q0.c(this.e, this.c, this.f618b, this.d, eVar2);
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|