discord-jadx/app/src/main/java/c/f/j/p/o0.java

99 lines
3.6 KiB
Java

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 */
public final /* synthetic */ l f487c;
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;
this.f487c = lVar;
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);
this.f487c.d();
} else if (gVar.e()) {
this.a.k(this.b, "PartialDiskCacheProducer", gVar.d(), null);
q0.c(this.e, this.f487c, this.b, this.d, null);
} 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);
this.f487c.b(eVar2, 9);
} else {
this.f487c.b(eVar2, 8);
ImageRequestBuilder b = ImageRequestBuilder.b(e.f2182c);
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;
b.f2184c = e.i;
b.n = e.r;
b.d = e.j;
b.m = e.p;
b.p = e.f2183s;
int i = f2 - 1;
if (i >= 0) {
z3 = true;
}
AnimatableValueParser.j(Boolean.valueOf(z3));
b.o = new a(i, Integer.MAX_VALUE);
q0.c(this.e, this.f487c, new c1(b.a(), this.b), this.d, eVar2);
}
} else {
y0 y0Var2 = this.a;
w0 w0Var2 = this.b;
y0Var2.j(w0Var2, "PartialDiskCacheProducer", q0.d(y0Var2, w0Var2, false, 0));
q0.c(this.e, this.f487c, this.b, this.d, eVar2);
}
}
return null;
}
}