92 lines
2.5 KiB
Java
92 lines
2.5 KiB
Java
package o;
|
|
|
|
import android.os.Trace;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.Method;
|
|
|
|
/* renamed from: o.cMN, reason: case insensitive filesystem */
|
|
/* loaded from: classes.dex */
|
|
public final class C6212cMN {
|
|
private static Method a;
|
|
private static Method c;
|
|
private static long d;
|
|
private static Method e;
|
|
|
|
public static boolean c() {
|
|
try {
|
|
if (c == null) {
|
|
return Trace.isEnabled();
|
|
}
|
|
} catch (NoClassDefFoundError | NoSuchMethodError unused) {
|
|
}
|
|
return b();
|
|
}
|
|
|
|
public static void d(String str) {
|
|
C1776aOB.a(str);
|
|
}
|
|
|
|
public static void a() {
|
|
C1776aOB.c();
|
|
}
|
|
|
|
public static void b(String str, int i) {
|
|
try {
|
|
if (e == null) {
|
|
C12470eyn.b(str, i);
|
|
return;
|
|
}
|
|
} catch (NoClassDefFoundError | NoSuchMethodError unused) {
|
|
}
|
|
try {
|
|
if (e == null) {
|
|
e = Trace.class.getMethod("asyncTraceBegin", Long.TYPE, String.class, Integer.TYPE);
|
|
}
|
|
e.invoke(null, Long.valueOf(d), str, Integer.valueOf(i));
|
|
} catch (Exception e2) {
|
|
b(e2);
|
|
}
|
|
}
|
|
|
|
public static void d(String str, int i) {
|
|
try {
|
|
if (a == null) {
|
|
C12470eyn.c(str, i);
|
|
return;
|
|
}
|
|
} catch (NoClassDefFoundError | NoSuchMethodError unused) {
|
|
}
|
|
try {
|
|
if (a == null) {
|
|
a = Trace.class.getMethod("asyncTraceEnd", Long.TYPE, String.class, Integer.TYPE);
|
|
}
|
|
a.invoke(null, Long.valueOf(d), str, Integer.valueOf(i));
|
|
} catch (Exception e2) {
|
|
b(e2);
|
|
}
|
|
}
|
|
|
|
private static boolean b() {
|
|
try {
|
|
if (c == null) {
|
|
d = Trace.class.getField("TRACE_TAG_APP").getLong(null);
|
|
c = Trace.class.getMethod("isTagEnabled", Long.TYPE);
|
|
}
|
|
return ((Boolean) c.invoke(null, Long.valueOf(d))).booleanValue();
|
|
} catch (Exception e2) {
|
|
b(e2);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
private static void b(Exception exc) {
|
|
if (exc instanceof InvocationTargetException) {
|
|
Throwable cause = exc.getCause();
|
|
if (cause instanceof RuntimeException) {
|
|
throw ((RuntimeException) cause);
|
|
}
|
|
throw new RuntimeException(cause);
|
|
}
|
|
}
|
|
}
|