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

127 lines
3.9 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.os.SystemClock;
import android.util.Log;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
/* loaded from: classes.dex */
public class qWd {
public static boolean a = Log.isLoggable("Volley", 2);
private static final String b = qWd.class.getName();
public static void e(String str, Object... objArr) {
if (a) {
g(str, objArr);
}
}
public static void d(String str, Object... objArr) {
g(str, objArr);
}
public static void a(String str, Object... objArr) {
g(str, objArr);
}
public static void b(String str, Object... objArr) {
g(str, objArr);
}
public static void c(String str, Object... objArr) {
g(str, objArr);
}
private static String g(String str, Object... objArr) {
String str2;
if (objArr != null) {
str = String.format(Locale.US, str, objArr);
}
StackTraceElement[] stackTrace = new Throwable().fillInStackTrace().getStackTrace();
int i = 2;
while (true) {
if (i >= stackTrace.length) {
str2 = "<unknown>";
break;
}
if (!stackTrace[i].getClassName().equals(b)) {
String className = stackTrace[i].getClassName();
String substring = className.substring(className.lastIndexOf(46) + 1);
String substring2 = substring.substring(substring.lastIndexOf(36) + 1);
StringBuilder sb = new StringBuilder();
sb.append(substring2);
sb.append(".");
sb.append(stackTrace[i].getMethodName());
str2 = sb.toString();
break;
}
i++;
}
return String.format(Locale.US, "[%d] %s: %s", Long.valueOf(Thread.currentThread().getId()), str2, str);
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static class HBt {
public static final boolean d = qWd.a;
private final List<LWm> b = new ArrayList();
private boolean e = false;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static class LWm {
public final long b;
public final long c;
public final String e;
public LWm(String str, long j, long j2) {
this.e = str;
this.b = j;
this.c = j2;
}
}
public final void c(String str, long j) {
synchronized (this) {
if (this.e) {
throw new IllegalStateException("Marker added to finished log");
}
this.b.add(new LWm(str, j, SystemClock.elapsedRealtime()));
}
}
public final void e(String str) {
synchronized (this) {
this.e = true;
long d2 = d();
if (d2 <= 0) {
return;
}
long j = this.b.get(0).c;
qWd.d("(%-4d ms) %s", Long.valueOf(d2), str);
for (LWm lWm : this.b) {
long j2 = lWm.c;
qWd.d("(+%-4d) [%2d] %s", Long.valueOf(j2 - j), Long.valueOf(lWm.b), lWm.e);
j = j2;
}
}
}
protected void finalize() throws Throwable {
if (this.e) {
return;
}
e("Request on the loose");
qWd.a("Marker log finalized without finish() - uncaught exit point for request", new Object[0]);
}
private long d() {
if (this.b.size() == 0) {
return 0L;
}
return this.b.get(r2.size() - 1).c - this.b.get(0).c;
}
}
}