discord-jadx/app/src/main/java/b/f/j/c/e.java

68 lines
2.2 KiB
Java
Raw Normal View History

2021-12-17 21:59:34 +00:00
package b.f.j.c;
2021-07-24 02:37:17 +00:00
2021-12-17 21:59:34 +00:00
import b.f.d.e.a;
2021-07-24 02:37:17 +00:00
import com.facebook.cache.common.CacheKey;
import com.facebook.common.memory.PooledByteBuffer;
import com.facebook.common.references.CloseableReference;
import java.util.Objects;
import java.util.concurrent.Callable;
import java.util.concurrent.CancellationException;
import java.util.concurrent.atomic.AtomicBoolean;
2022-03-07 09:34:54 +00:00
/* compiled from: BufferedDiskCache.java */
2022-04-04 09:20:14 +00:00
/* loaded from: classes2.dex */
2021-12-17 21:59:34 +00:00
public class e implements Callable<b.f.j.j.e> {
2021-12-02 18:53:44 +00:00
public final /* synthetic */ AtomicBoolean j;
public final /* synthetic */ CacheKey k;
public final /* synthetic */ f l;
2021-07-24 02:37:17 +00:00
public e(f fVar, Object obj, AtomicBoolean atomicBoolean, CacheKey cacheKey) {
2021-12-02 18:53:44 +00:00
this.l = fVar;
this.j = atomicBoolean;
this.k = cacheKey;
2021-07-24 02:37:17 +00:00
}
@Override // java.util.concurrent.Callable
2021-12-17 21:59:34 +00:00
public b.f.j.j.e call() throws Exception {
2022-03-07 09:34:54 +00:00
PooledByteBuffer a;
try {
if (!this.j.get()) {
b.f.j.j.e a2 = this.l.f.a(this.k);
if (a2 != null) {
this.k.b();
int i = a.a;
Objects.requireNonNull((z) this.l.g);
} else {
this.k.b();
int i2 = a.a;
Objects.requireNonNull((z) this.l.g);
a2 = null;
try {
a = f.a(this.l, this.k);
} catch (Exception unused) {
}
if (a == null) {
return a2;
2021-07-24 02:37:17 +00:00
}
2022-03-07 09:34:54 +00:00
CloseableReference A = CloseableReference.A(a);
2021-07-24 02:37:17 +00:00
try {
2022-03-07 09:34:54 +00:00
a2 = new b.f.j.j.e(A);
2021-07-24 02:37:17 +00:00
} finally {
2021-11-05 06:48:17 +00:00
if (A != null) {
A.close();
2021-07-24 02:37:17 +00:00
}
}
}
2022-03-07 09:34:54 +00:00
if (!Thread.interrupted()) {
return a2;
}
2021-07-24 02:37:17 +00:00
a.i(f.class, "Host thread was interrupted, decreasing reference count");
2022-03-07 09:34:54 +00:00
a2.close();
2021-07-24 02:37:17 +00:00
throw new InterruptedException();
}
2022-03-07 09:34:54 +00:00
throw new CancellationException();
} finally {
throw th;
2021-07-24 02:37:17 +00:00
}
}
}