58 lines
1.8 KiB
Java
58 lines
1.8 KiB
Java
package c.f.j.p;
|
|
|
|
import androidx.annotation.VisibleForTesting;
|
|
import c.f.j.c.f;
|
|
import c.f.j.c.i;
|
|
import c.f.j.c.n;
|
|
import c.f.j.j.e;
|
|
import com.facebook.cache.common.CacheKey;
|
|
import com.facebook.imagepipeline.request.ImageRequest;
|
|
import java.util.Map;
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
/* compiled from: DiskCacheReadProducer */
|
|
public class s implements v0<e> {
|
|
public final f a;
|
|
public final f b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final i f507c;
|
|
public final v0<e> d;
|
|
|
|
public s(f fVar, f fVar2, i iVar, v0<e> v0Var) {
|
|
this.a = fVar;
|
|
this.b = fVar2;
|
|
this.f507c = iVar;
|
|
this.d = v0Var;
|
|
}
|
|
|
|
@VisibleForTesting
|
|
public static Map<String, String> c(y0 y0Var, w0 w0Var, boolean z2, int i) {
|
|
if (!y0Var.g(w0Var, "DiskCacheProducer")) {
|
|
return null;
|
|
}
|
|
return z2 ? c.f.d.d.f.of("cached_value_found", String.valueOf(z2), "encodedImageSize", String.valueOf(i)) : c.f.d.d.f.of("cached_value_found", String.valueOf(z2));
|
|
}
|
|
|
|
@Override // c.f.j.p.v0
|
|
public void b(l<e> lVar, w0 w0Var) {
|
|
ImageRequest e = w0Var.e();
|
|
boolean z2 = true;
|
|
if (e.n) {
|
|
w0Var.o().e(w0Var, "DiskCacheProducer");
|
|
CacheKey b = ((n) this.f507c).b(e, w0Var.b());
|
|
if (e.b != ImageRequest.b.SMALL) {
|
|
z2 = false;
|
|
}
|
|
f fVar = z2 ? this.b : this.a;
|
|
AtomicBoolean atomicBoolean = new AtomicBoolean(false);
|
|
fVar.e(b, atomicBoolean).b(new q(this, w0Var.o(), w0Var, lVar));
|
|
w0Var.f(new r(this, atomicBoolean));
|
|
} else if (w0Var.q().g() >= ImageRequest.c.DISK_CACHE.g()) {
|
|
w0Var.i("disk", "nil-result_read");
|
|
lVar.b(null, 1);
|
|
} else {
|
|
this.d.b(lVar, w0Var);
|
|
}
|
|
}
|
|
}
|