ADD week 5

This commit is contained in:
2025-03-31 16:33:42 +02:00
parent 86f265f22d
commit bf645048e6
4927 changed files with 544053 additions and 0 deletions

View File

@ -0,0 +1,7 @@
package androidx.tracing;
/* loaded from: classes.dex */
public final class R {
private R() {
}
}

View File

@ -0,0 +1,29 @@
package androidx.tracing;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.autofill.AutofillManager;
import android.view.inputmethod.InputContentInfo;
import android.view.inspector.InspectionCompanion;
import java.util.Map;
/* compiled from: D8$$SyntheticClass */
/* loaded from: classes.dex */
public final /* synthetic */ class Trace$$ExternalSyntheticApiModelOutline0 {
public static /* synthetic */ AccessibilityNodeInfo.TouchDelegateInfo m(Map map) {
return new AccessibilityNodeInfo.TouchDelegateInfo(map);
}
public static /* bridge */ /* synthetic */ InputContentInfo m(Object obj) {
return (InputContentInfo) obj;
}
/* renamed from: m, reason: collision with other method in class */
public static /* synthetic */ InspectionCompanion.UninitializedPropertyMapException m176m() {
return new InspectionCompanion.UninitializedPropertyMapException();
}
/* renamed from: m, reason: collision with other method in class */
public static /* bridge */ /* synthetic */ Class m177m() {
return AutofillManager.class;
}
}

View File

@ -0,0 +1,128 @@
package androidx.tracing;
import android.util.Log;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
public final class Trace {
static final String TAG = "Trace";
private static Method sAsyncTraceBeginMethod;
private static Method sAsyncTraceEndMethod;
private static Method sIsTagEnabledMethod;
private static Method sTraceCounterMethod;
private static long sTraceTagApp;
public static boolean isEnabled() {
boolean isEnabled;
try {
if (sIsTagEnabledMethod == null) {
isEnabled = android.os.Trace.isEnabled();
return isEnabled;
}
} catch (NoClassDefFoundError | NoSuchMethodError unused) {
}
return isEnabledFallback();
}
public static void beginSection(String str) {
TraceApi18Impl.beginSection(str);
}
public static void endSection() {
TraceApi18Impl.endSection();
}
public static void beginAsyncSection(String str, int i) {
try {
if (sAsyncTraceBeginMethod == null) {
TraceApi29Impl.beginAsyncSection(str, i);
return;
}
} catch (NoClassDefFoundError | NoSuchMethodError unused) {
}
beginAsyncSectionFallback(str, i);
}
public static void endAsyncSection(String str, int i) {
try {
if (sAsyncTraceEndMethod == null) {
TraceApi29Impl.endAsyncSection(str, i);
return;
}
} catch (NoClassDefFoundError | NoSuchMethodError unused) {
}
endAsyncSectionFallback(str, i);
}
public static void setCounter(String str, int i) {
try {
if (sTraceCounterMethod == null) {
TraceApi29Impl.setCounter(str, i);
return;
}
} catch (NoClassDefFoundError | NoSuchMethodError unused) {
}
setCounterFallback(str, i);
}
private static boolean isEnabledFallback() {
try {
if (sIsTagEnabledMethod == null) {
sTraceTagApp = android.os.Trace.class.getField("TRACE_TAG_APP").getLong(null);
sIsTagEnabledMethod = android.os.Trace.class.getMethod("isTagEnabled", Long.TYPE);
}
return ((Boolean) sIsTagEnabledMethod.invoke(null, Long.valueOf(sTraceTagApp))).booleanValue();
} catch (Exception e) {
handleException("isTagEnabled", e);
return false;
}
}
private static void beginAsyncSectionFallback(String str, int i) {
try {
if (sAsyncTraceBeginMethod == null) {
sAsyncTraceBeginMethod = android.os.Trace.class.getMethod("asyncTraceBegin", Long.TYPE, String.class, Integer.TYPE);
}
sAsyncTraceBeginMethod.invoke(null, Long.valueOf(sTraceTagApp), str, Integer.valueOf(i));
} catch (Exception e) {
handleException("asyncTraceBegin", e);
}
}
private static void endAsyncSectionFallback(String str, int i) {
try {
if (sAsyncTraceEndMethod == null) {
sAsyncTraceEndMethod = android.os.Trace.class.getMethod("asyncTraceEnd", Long.TYPE, String.class, Integer.TYPE);
}
sAsyncTraceEndMethod.invoke(null, Long.valueOf(sTraceTagApp), str, Integer.valueOf(i));
} catch (Exception e) {
handleException("asyncTraceEnd", e);
}
}
private static void setCounterFallback(String str, int i) {
try {
if (sTraceCounterMethod == null) {
sTraceCounterMethod = android.os.Trace.class.getMethod("traceCounter", Long.TYPE, String.class, Integer.TYPE);
}
sTraceCounterMethod.invoke(null, Long.valueOf(sTraceTagApp), str, Integer.valueOf(i));
} catch (Exception e) {
handleException("traceCounter", e);
}
}
private static void handleException(String str, Exception exc) {
if (exc instanceof InvocationTargetException) {
Throwable cause = exc.getCause();
if (cause instanceof RuntimeException) {
throw ((RuntimeException) cause);
}
throw new RuntimeException(cause);
}
Log.v(TAG, "Unable to call " + str + " via reflection", exc);
}
private Trace() {
}
}

View File

@ -0,0 +1,15 @@
package androidx.tracing;
/* loaded from: classes.dex */
final class TraceApi18Impl {
private TraceApi18Impl() {
}
public static void beginSection(String str) {
android.os.Trace.beginSection(str);
}
public static void endSection() {
android.os.Trace.endSection();
}
}

View File

@ -0,0 +1,19 @@
package androidx.tracing;
/* loaded from: classes.dex */
final class TraceApi29Impl {
private TraceApi29Impl() {
}
public static void beginAsyncSection(String str, int i) {
android.os.Trace.beginAsyncSection(str, i);
}
public static void endAsyncSection(String str, int i) {
android.os.Trace.endAsyncSection(str, i);
}
public static void setCounter(String str, int i) {
android.os.Trace.setCounter(str, i);
}
}