discord-jadx/app/src/main/java/b/f/j/p/s.java

58 lines
1.9 KiB
Java
Raw Normal View History

2021-12-17 21:59:34 +00:00
package b.f.j.p;
2021-07-24 02:37:17 +00:00
import androidx.annotation.VisibleForTesting;
2021-12-17 21:59:34 +00:00
import b.f.j.c.f;
import b.f.j.c.i;
import b.f.j.c.n;
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 java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
/* compiled from: DiskCacheReadProducer */
2022-01-13 08:07:50 +00:00
public class s implements w0<e> {
2021-07-24 02:37:17 +00:00
public final f a;
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-21 08:24:42 +00:00
public final f f631b;
2021-12-17 21:59:34 +00:00
public final i c;
2022-01-13 08:07:50 +00:00
public final w0<e> d;
2021-07-24 02:37:17 +00:00
2022-01-13 08:07:50 +00:00
public s(f fVar, f fVar2, i iVar, w0<e> w0Var) {
2021-07-24 02:37:17 +00:00
this.a = fVar;
2022-01-21 08:24:42 +00:00
this.f631b = fVar2;
2021-12-17 21:59:34 +00:00
this.c = iVar;
2022-01-13 08:07:50 +00:00
this.d = w0Var;
2021-07-24 02:37:17 +00:00
}
@VisibleForTesting
2022-01-13 08:07:50 +00:00
public static Map<String, String> c(z0 z0Var, x0 x0Var, boolean z2, int i) {
if (!z0Var.g(x0Var, "DiskCacheProducer")) {
2021-07-24 02:37:17 +00:00
return null;
}
2021-12-17 21:59:34 +00:00
return z2 ? b.f.d.d.f.of("cached_value_found", String.valueOf(z2), "encodedImageSize", String.valueOf(i)) : b.f.d.d.f.of("cached_value_found", String.valueOf(z2));
2021-07-24 02:37:17 +00:00
}
2022-01-13 08:07:50 +00:00
@Override // b.f.j.p.w0
public void b(l<e> lVar, x0 x0Var) {
ImageRequest e = x0Var.e();
2021-07-24 02:37:17 +00:00
boolean z2 = true;
2022-01-13 08:07:50 +00:00
if (x0Var.e().b(16)) {
x0Var.o().e(x0Var, "DiskCacheProducer");
CacheKey b2 = ((n) this.c).b(e, x0Var.b());
2022-01-22 08:57:18 +00:00
if (e.f2871b != ImageRequest.b.SMALL) {
2021-07-24 02:37:17 +00:00
z2 = false;
}
2022-01-21 08:24:42 +00:00
f fVar = z2 ? this.f631b : this.a;
2021-07-24 02:37:17 +00:00
AtomicBoolean atomicBoolean = new AtomicBoolean(false);
2022-01-13 08:07:50 +00:00
fVar.e(b2, atomicBoolean).b(new q(this, x0Var.o(), x0Var, lVar));
x0Var.f(new r(this, atomicBoolean));
} else if (x0Var.q().g() >= ImageRequest.c.DISK_CACHE.g()) {
x0Var.i("disk", "nil-result_read");
2021-07-24 02:37:17 +00:00
lVar.b(null, 1);
} else {
2022-01-13 08:07:50 +00:00
this.d.b(lVar, x0Var);
2021-07-24 02:37:17 +00:00
}
}
}