what-the-bank/sources/o/C0676MAs.java

86 lines
3.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.net.TrafficStats;
import android.os.Process;
import android.os.SystemClock;
import com.android.volley.VolleyError;
import java.util.concurrent.BlockingQueue;
/* renamed from: o.MAs, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0676MAs extends Thread {
private final ZFL a;
private final BlockingQueue<HJP<?>> b;
private final qNX c;
private final InterfaceC17333vqS d;
public volatile boolean e = false;
public C0676MAs(BlockingQueue<HJP<?>> blockingQueue, ZFL zfl, InterfaceC17333vqS interfaceC17333vqS, qNX qnx) {
this.b = blockingQueue;
this.a = zfl;
this.d = interfaceC17333vqS;
this.c = qnx;
}
@Override // java.lang.Thread, java.lang.Runnable
public final void run() {
Process.setThreadPriority(10);
while (true) {
try {
c();
} catch (InterruptedException unused) {
if (this.e) {
Thread.currentThread().interrupt();
return;
}
qWd.a("Ignoring spurious interrupt of NetworkDispatcher thread; use quit() to terminate it", new Object[0]);
}
}
}
private void c() throws InterruptedException {
HJP<?> take = this.b.take();
SystemClock.elapsedRealtime();
take.sendEvent(3);
try {
try {
take.addMarker("network-queue-take");
} catch (VolleyError e) {
SystemClock.elapsedRealtime();
this.c.e(take, take.parseNetworkError(e));
take.notifyListenerResponseNotUsable();
} catch (Exception e2) {
qWd.b("Unhandled exception %s", e2.toString());
VolleyError volleyError = new VolleyError(e2);
SystemClock.elapsedRealtime();
this.c.e(take, volleyError);
take.notifyListenerResponseNotUsable();
}
if (take.isCanceled()) {
take.finish("network-discard-cancelled");
take.notifyListenerResponseNotUsable();
return;
}
TrafficStats.setThreadStatsTag(take.getTrafficStatsTag());
DrQ e3 = this.a.e(take);
take.addMarker("network-http-complete");
if (e3.b && take.hasHadResponseDelivered()) {
take.finish("not-modified");
take.notifyListenerResponseNotUsable();
return;
}
C15788ibz<?> parseNetworkResponse = take.parseNetworkResponse(e3);
take.addMarker("network-parse-complete");
if (take.shouldCache() && parseNetworkResponse.a != null) {
this.d.c(take.getCacheKey(), parseNetworkResponse.a);
take.addMarker("network-cache-written");
}
take.markDelivered();
this.c.e(take, parseNetworkResponse);
take.notifyListenerResponseReceived(parseNetworkResponse);
} finally {
take.sendEvent(4);
}
}
}