Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
package androidx.core.os;
import androidx.annotation.RequiresApi;
import kotlin.jvm.internal.DefaultConstructorMarker;
@RequiresApi(api = 35)
/* loaded from: classes.dex */
public abstract class BufferFillPolicy {
public static final Companion Companion = new Companion(null);
public static final BufferFillPolicy DISCARD = new Discard();
public static final BufferFillPolicy RING_BUFFER = new RingBuffer();
private final int value;
public /* synthetic */ BufferFillPolicy(int i, DefaultConstructorMarker defaultConstructorMarker) {
this(i);
}
public final int getValue$core_release() {
return this.value;
}
private BufferFillPolicy(int i) {
this.value = i;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
public static final class Discard extends BufferFillPolicy {
public Discard() {
super(1, null);
}
}
public static final class RingBuffer extends BufferFillPolicy {
public RingBuffer() {
super(2, null);
}
}
}

View File

@@ -0,0 +1,182 @@
package androidx.core.os;
import android.os.Build;
import android.os.ext.SdkExtensions;
import androidx.annotation.ChecksSdkIntAtLeast;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
import androidx.annotation.VisibleForTesting;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Locale;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class BuildCompat {
@ChecksSdkIntAtLeast(extension = 1000000)
public static final int AD_SERVICES_EXTENSION_INT;
public static final BuildCompat INSTANCE = new BuildCompat();
@ChecksSdkIntAtLeast(extension = 30)
public static final int R_EXTENSION_INT;
@ChecksSdkIntAtLeast(extension = 31)
public static final int S_EXTENSION_INT;
@ChecksSdkIntAtLeast(extension = 33)
public static final int T_EXTENSION_INT;
@Retention(RetentionPolicy.CLASS)
public @interface PrereleaseSdkCheck {
}
@ChecksSdkIntAtLeast(api = 24)
public static final boolean isAtLeastN() {
return true;
}
@ChecksSdkIntAtLeast(api = 25)
public static final boolean isAtLeastNMR1() {
return true;
}
@ChecksSdkIntAtLeast(api = 26)
public static final boolean isAtLeastO() {
return true;
}
@ChecksSdkIntAtLeast(api = 27)
public static final boolean isAtLeastOMR1() {
return Build.VERSION.SDK_INT >= 27;
}
@ChecksSdkIntAtLeast(api = 28)
public static final boolean isAtLeastP() {
return Build.VERSION.SDK_INT >= 28;
}
@ChecksSdkIntAtLeast(api = 29)
public static final boolean isAtLeastQ() {
return Build.VERSION.SDK_INT >= 29;
}
@ChecksSdkIntAtLeast(api = 30)
public static final boolean isAtLeastR() {
return Build.VERSION.SDK_INT >= 30;
}
private BuildCompat() {
}
@RestrictTo({RestrictTo.Scope.LIBRARY})
@VisibleForTesting
public static final boolean isAtLeastPreReleaseCodename(String codename, String buildCodename) {
Intrinsics.checkNotNullParameter(codename, "codename");
Intrinsics.checkNotNullParameter(buildCodename, "buildCodename");
if (Intrinsics.areEqual("REL", buildCodename)) {
return false;
}
Locale locale = Locale.ROOT;
String upperCase = buildCodename.toUpperCase(locale);
Intrinsics.checkNotNullExpressionValue(upperCase, "this as java.lang.String).toUpperCase(Locale.ROOT)");
String upperCase2 = codename.toUpperCase(locale);
Intrinsics.checkNotNullExpressionValue(upperCase2, "this as java.lang.String).toUpperCase(Locale.ROOT)");
return upperCase.compareTo(upperCase2) >= 0;
}
@ChecksSdkIntAtLeast(api = 31, codename = "S")
public static final boolean isAtLeastS() {
int i = Build.VERSION.SDK_INT;
if (i < 31) {
if (i >= 30) {
String CODENAME = Build.VERSION.CODENAME;
Intrinsics.checkNotNullExpressionValue(CODENAME, "CODENAME");
if (isAtLeastPreReleaseCodename("S", CODENAME)) {
}
}
return false;
}
return true;
}
@ChecksSdkIntAtLeast(api = 32, codename = "Sv2")
public static final boolean isAtLeastSv2() {
int i = Build.VERSION.SDK_INT;
if (i < 32) {
if (i >= 31) {
String CODENAME = Build.VERSION.CODENAME;
Intrinsics.checkNotNullExpressionValue(CODENAME, "CODENAME");
if (isAtLeastPreReleaseCodename("Sv2", CODENAME)) {
}
}
return false;
}
return true;
}
@ChecksSdkIntAtLeast(api = 33, codename = "Tiramisu")
public static final boolean isAtLeastT() {
int i = Build.VERSION.SDK_INT;
if (i < 33) {
if (i >= 32) {
String CODENAME = Build.VERSION.CODENAME;
Intrinsics.checkNotNullExpressionValue(CODENAME, "CODENAME");
if (isAtLeastPreReleaseCodename("Tiramisu", CODENAME)) {
}
}
return false;
}
return true;
}
@ChecksSdkIntAtLeast(api = 34, codename = "UpsideDownCake")
public static final boolean isAtLeastU() {
int i = Build.VERSION.SDK_INT;
if (i < 34) {
if (i >= 33) {
String CODENAME = Build.VERSION.CODENAME;
Intrinsics.checkNotNullExpressionValue(CODENAME, "CODENAME");
if (isAtLeastPreReleaseCodename("UpsideDownCake", CODENAME)) {
}
}
return false;
}
return true;
}
@ChecksSdkIntAtLeast(api = 35, codename = "VanillaIceCream")
public static final boolean isAtLeastV() {
int i = Build.VERSION.SDK_INT;
if (i < 35) {
if (i >= 34) {
String CODENAME = Build.VERSION.CODENAME;
Intrinsics.checkNotNullExpressionValue(CODENAME, "CODENAME");
if (isAtLeastPreReleaseCodename("VanillaIceCream", CODENAME)) {
}
}
return false;
}
return true;
}
static {
int i = Build.VERSION.SDK_INT;
R_EXTENSION_INT = i >= 30 ? Api30Impl.INSTANCE.getExtensionVersion(30) : 0;
S_EXTENSION_INT = i >= 30 ? Api30Impl.INSTANCE.getExtensionVersion(31) : 0;
T_EXTENSION_INT = i >= 30 ? Api30Impl.INSTANCE.getExtensionVersion(33) : 0;
AD_SERVICES_EXTENSION_INT = i >= 30 ? Api30Impl.INSTANCE.getExtensionVersion(1000000) : 0;
}
@RequiresApi(30)
public static final class Api30Impl {
public static final Api30Impl INSTANCE = new Api30Impl();
private Api30Impl() {
}
public final int getExtensionVersion(int i) {
return SdkExtensions.getExtensionVersion(i);
}
}
}

View File

@@ -0,0 +1,23 @@
package androidx.core.os;
import android.os.Bundle;
import android.util.Size;
import android.util.SizeF;
import androidx.annotation.RequiresApi;
@RequiresApi(21)
/* loaded from: classes.dex */
final class BundleApi21ImplKt {
public static final BundleApi21ImplKt INSTANCE = new BundleApi21ImplKt();
private BundleApi21ImplKt() {
}
public static final void putSize(Bundle bundle, String str, Size size) {
bundle.putSize(str, size);
}
public static final void putSizeF(Bundle bundle, String str, SizeF sizeF) {
bundle.putSizeF(str, sizeF);
}
}

View File

@@ -0,0 +1,109 @@
package androidx.core.os;
import android.annotation.SuppressLint;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Parcelable;
import android.util.SparseArray;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.ReplaceWith;
import androidx.annotation.RequiresApi;
import java.io.Serializable;
import java.util.ArrayList;
/* loaded from: classes.dex */
public final class BundleCompat {
private BundleCompat() {
}
@Nullable
public static <T> T getParcelable(@NonNull Bundle bundle, @Nullable String str, @NonNull Class<T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return (T) Api33Impl.getParcelable(bundle, str, cls);
}
T t = (T) bundle.getParcelable(str);
if (cls.isInstance(t)) {
return t;
}
return null;
}
@Nullable
@SuppressLint({"ArrayReturn", "NullableCollection"})
public static Parcelable[] getParcelableArray(@NonNull Bundle bundle, @Nullable String str, @NonNull Class<? extends Parcelable> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return (Parcelable[]) Api33Impl.getParcelableArray(bundle, str, cls);
}
return bundle.getParcelableArray(str);
}
@Nullable
@SuppressLint({"ConcreteCollection", "NullableCollection"})
public static <T> ArrayList<T> getParcelableArrayList(@NonNull Bundle bundle, @Nullable String str, @NonNull Class<? extends T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return Api33Impl.getParcelableArrayList(bundle, str, cls);
}
return bundle.getParcelableArrayList(str);
}
@Nullable
public static <T> SparseArray<T> getSparseParcelableArray(@NonNull Bundle bundle, @Nullable String str, @NonNull Class<? extends T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return Api33Impl.getSparseParcelableArray(bundle, str, cls);
}
return bundle.getSparseParcelableArray(str);
}
@Nullable
@ReplaceWith(expression = "bundle.getBinder(key)")
@Deprecated
public static IBinder getBinder(@NonNull Bundle bundle, @Nullable String str) {
return bundle.getBinder(str);
}
@ReplaceWith(expression = "bundle.putBinder(key, binder)")
@Deprecated
public static void putBinder(@NonNull Bundle bundle, @Nullable String str, @Nullable IBinder iBinder) {
bundle.putBinder(str, iBinder);
}
@Nullable
public static <T extends Serializable> T getSerializable(@NonNull Bundle bundle, @Nullable String str, @NonNull Class<T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return (T) Api33Impl.getSerializable(bundle, str, cls);
}
T t = (T) bundle.getSerializable(str);
if (cls.isInstance(t)) {
return t;
}
return null;
}
@RequiresApi(33)
public static class Api33Impl {
private Api33Impl() {
}
public static <T> T getParcelable(@NonNull Bundle bundle, @Nullable String str, @NonNull Class<T> cls) {
return (T) bundle.getParcelable(str, cls);
}
public static <T> T[] getParcelableArray(@NonNull Bundle bundle, @Nullable String str, @NonNull Class<T> cls) {
return (T[]) bundle.getParcelableArray(str, cls);
}
public static <T> ArrayList<T> getParcelableArrayList(@NonNull Bundle bundle, @Nullable String str, @NonNull Class<? extends T> cls) {
return bundle.getParcelableArrayList(str, cls);
}
public static <T> SparseArray<T> getSparseParcelableArray(@NonNull Bundle bundle, @Nullable String str, @NonNull Class<? extends T> cls) {
return bundle.getSparseParcelableArray(str, cls);
}
public static <T extends Serializable> T getSerializable(@NonNull Bundle bundle, @Nullable String str, @NonNull Class<T> cls) {
return (T) bundle.getSerializable(str, cls);
}
}
}

View File

@@ -0,0 +1,94 @@
package androidx.core.os;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Parcelable;
import android.util.Size;
import android.util.SizeF;
import java.io.Serializable;
import kotlin.Pair;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class BundleKt {
public static final Bundle bundleOf(Pair... pairArr) {
Bundle bundle = new Bundle(pairArr.length);
for (Pair pair : pairArr) {
String str = (String) pair.component1();
Object component2 = pair.component2();
if (component2 == null) {
bundle.putString(str, null);
} else if (component2 instanceof Boolean) {
bundle.putBoolean(str, ((Boolean) component2).booleanValue());
} else if (component2 instanceof Byte) {
bundle.putByte(str, ((Number) component2).byteValue());
} else if (component2 instanceof Character) {
bundle.putChar(str, ((Character) component2).charValue());
} else if (component2 instanceof Double) {
bundle.putDouble(str, ((Number) component2).doubleValue());
} else if (component2 instanceof Float) {
bundle.putFloat(str, ((Number) component2).floatValue());
} else if (component2 instanceof Integer) {
bundle.putInt(str, ((Number) component2).intValue());
} else if (component2 instanceof Long) {
bundle.putLong(str, ((Number) component2).longValue());
} else if (component2 instanceof Short) {
bundle.putShort(str, ((Number) component2).shortValue());
} else if (component2 instanceof Bundle) {
bundle.putBundle(str, (Bundle) component2);
} else if (component2 instanceof CharSequence) {
bundle.putCharSequence(str, (CharSequence) component2);
} else if (component2 instanceof Parcelable) {
bundle.putParcelable(str, (Parcelable) component2);
} else if (component2 instanceof boolean[]) {
bundle.putBooleanArray(str, (boolean[]) component2);
} else if (component2 instanceof byte[]) {
bundle.putByteArray(str, (byte[]) component2);
} else if (component2 instanceof char[]) {
bundle.putCharArray(str, (char[]) component2);
} else if (component2 instanceof double[]) {
bundle.putDoubleArray(str, (double[]) component2);
} else if (component2 instanceof float[]) {
bundle.putFloatArray(str, (float[]) component2);
} else if (component2 instanceof int[]) {
bundle.putIntArray(str, (int[]) component2);
} else if (component2 instanceof long[]) {
bundle.putLongArray(str, (long[]) component2);
} else if (component2 instanceof short[]) {
bundle.putShortArray(str, (short[]) component2);
} else if (component2 instanceof Object[]) {
Class<?> componentType = component2.getClass().getComponentType();
Intrinsics.checkNotNull(componentType);
if (Parcelable.class.isAssignableFrom(componentType)) {
Intrinsics.checkNotNull(component2, "null cannot be cast to non-null type kotlin.Array<android.os.Parcelable>");
bundle.putParcelableArray(str, (Parcelable[]) component2);
} else if (String.class.isAssignableFrom(componentType)) {
Intrinsics.checkNotNull(component2, "null cannot be cast to non-null type kotlin.Array<kotlin.String>");
bundle.putStringArray(str, (String[]) component2);
} else if (CharSequence.class.isAssignableFrom(componentType)) {
Intrinsics.checkNotNull(component2, "null cannot be cast to non-null type kotlin.Array<kotlin.CharSequence>");
bundle.putCharSequenceArray(str, (CharSequence[]) component2);
} else if (Serializable.class.isAssignableFrom(componentType)) {
bundle.putSerializable(str, (Serializable) component2);
} else {
throw new IllegalArgumentException("Illegal value array type " + componentType.getCanonicalName() + " for key \"" + str + '\"');
}
} else if (component2 instanceof Serializable) {
bundle.putSerializable(str, (Serializable) component2);
} else if (component2 instanceof IBinder) {
bundle.putBinder(str, (IBinder) component2);
} else if (component2 instanceof Size) {
BundleApi21ImplKt.putSize(bundle, str, (Size) component2);
} else if (component2 instanceof SizeF) {
BundleApi21ImplKt.putSizeF(bundle, str, (SizeF) component2);
} else {
throw new IllegalArgumentException("Illegal value type " + component2.getClass().getCanonicalName() + " for key \"" + str + '\"');
}
}
return bundle;
}
public static final Bundle bundleOf() {
return new Bundle(0);
}
}

View File

@@ -0,0 +1,108 @@
package androidx.core.os;
import androidx.annotation.Nullable;
@Deprecated
/* loaded from: classes.dex */
public final class CancellationSignal {
private boolean mCancelInProgress;
private Object mCancellationSignalObj;
private boolean mIsCanceled;
private OnCancelListener mOnCancelListener;
public interface OnCancelListener {
void onCancel();
}
public boolean isCanceled() {
boolean z;
synchronized (this) {
z = this.mIsCanceled;
}
return z;
}
public void throwIfCanceled() {
if (isCanceled()) {
throw new OperationCanceledException();
}
}
public void cancel() {
synchronized (this) {
try {
if (this.mIsCanceled) {
return;
}
this.mIsCanceled = true;
this.mCancelInProgress = true;
OnCancelListener onCancelListener = this.mOnCancelListener;
Object obj = this.mCancellationSignalObj;
if (onCancelListener != null) {
try {
onCancelListener.onCancel();
} catch (Throwable th) {
synchronized (this) {
this.mCancelInProgress = false;
notifyAll();
throw th;
}
}
}
if (obj != null) {
((android.os.CancellationSignal) obj).cancel();
}
synchronized (this) {
this.mCancelInProgress = false;
notifyAll();
}
} finally {
}
}
}
public void setOnCancelListener(@Nullable OnCancelListener onCancelListener) {
synchronized (this) {
try {
waitForCancelFinishedLocked();
if (this.mOnCancelListener == onCancelListener) {
return;
}
this.mOnCancelListener = onCancelListener;
if (this.mIsCanceled && onCancelListener != null) {
onCancelListener.onCancel();
}
} finally {
}
}
}
@Nullable
public Object getCancellationSignalObject() {
Object obj;
synchronized (this) {
try {
if (this.mCancellationSignalObj == null) {
android.os.CancellationSignal cancellationSignal = new android.os.CancellationSignal();
this.mCancellationSignalObj = cancellationSignal;
if (this.mIsCanceled) {
cancellationSignal.cancel();
}
}
obj = this.mCancellationSignalObj;
} catch (Throwable th) {
throw th;
}
}
return obj;
}
private void waitForCancelFinishedLocked() {
while (this.mCancelInProgress) {
try {
wait();
} catch (InterruptedException unused) {
}
}
}
}

View File

@@ -0,0 +1,35 @@
package androidx.core.os;
import android.content.res.Configuration;
import android.os.LocaleList;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
/* loaded from: classes.dex */
public final class ConfigurationCompat {
private ConfigurationCompat() {
}
@NonNull
public static LocaleListCompat getLocales(@NonNull Configuration configuration) {
return LocaleListCompat.wrap(Api24Impl.getLocales(configuration));
}
public static void setLocales(@NonNull Configuration configuration, @NonNull LocaleListCompat localeListCompat) {
Api24Impl.setLocales(configuration, localeListCompat);
}
@RequiresApi(24)
public static class Api24Impl {
private Api24Impl() {
}
public static LocaleList getLocales(Configuration configuration) {
return configuration.getLocales();
}
public static void setLocales(@NonNull Configuration configuration, @NonNull LocaleListCompat localeListCompat) {
configuration.setLocales((LocaleList) localeListCompat.unwrap());
}
}
}

View File

@@ -0,0 +1,39 @@
package androidx.core.os;
import android.os.OutcomeReceiver;
import androidx.annotation.RequiresApi;
import java.lang.Throwable;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.coroutines.Continuation;
@RequiresApi(31)
/* loaded from: classes.dex */
final class ContinuationOutcomeReceiver<R, E extends Throwable> extends AtomicBoolean implements OutcomeReceiver {
private final Continuation continuation;
public ContinuationOutcomeReceiver(Continuation continuation) {
super(false);
this.continuation = continuation;
}
public void onResult(R r) {
if (compareAndSet(false, true)) {
this.continuation.resumeWith(Result.m4060constructorimpl(r));
}
}
public void onError(E e) {
if (compareAndSet(false, true)) {
Continuation continuation = this.continuation;
Result.Companion companion = Result.Companion;
continuation.resumeWith(Result.m4060constructorimpl(ResultKt.createFailure(e)));
}
}
@Override // java.util.concurrent.atomic.AtomicBoolean
public String toString() {
return "ContinuationOutcomeReceiver(outcomeReceived = " + get() + ')';
}
}

View File

@@ -0,0 +1,31 @@
package androidx.core.os;
import android.os.Environment;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import java.io.File;
/* loaded from: classes.dex */
public final class EnvironmentCompat {
@Deprecated
public static final String MEDIA_UNKNOWN = "unknown";
@NonNull
public static String getStorageState(@NonNull File file) {
return Api21Impl.getExternalStorageState(file);
}
private EnvironmentCompat() {
}
@RequiresApi(21)
public static class Api21Impl {
private Api21Impl() {
}
public static String getExternalStorageState(File file) {
return Environment.getExternalStorageState(file);
}
}
}

View File

@@ -0,0 +1,34 @@
package androidx.core.os;
import android.os.Handler;
import androidx.annotation.NonNull;
import androidx.core.util.Preconditions;
import java.util.concurrent.Executor;
import java.util.concurrent.RejectedExecutionException;
/* loaded from: classes.dex */
public final class ExecutorCompat {
@NonNull
public static Executor create(@NonNull Handler handler) {
return new HandlerExecutor(handler);
}
private ExecutorCompat() {
}
public static class HandlerExecutor implements Executor {
private final Handler mHandler;
public HandlerExecutor(@NonNull Handler handler) {
this.mHandler = (Handler) Preconditions.checkNotNull(handler);
}
@Override // java.util.concurrent.Executor
public void execute(@NonNull Runnable runnable) {
if (this.mHandler.post((Runnable) Preconditions.checkNotNull(runnable))) {
return;
}
throw new RejectedExecutionException(this.mHandler + " is shutting down");
}
}
}

View File

@@ -0,0 +1,145 @@
package androidx.core.os;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import java.lang.reflect.InvocationTargetException;
/* loaded from: classes.dex */
public final class HandlerCompat {
private static final String TAG = "HandlerCompat";
@NonNull
public static Handler createAsync(@NonNull Looper looper) {
if (Build.VERSION.SDK_INT >= 28) {
return Api28Impl.createAsync(looper);
}
try {
return (Handler) Handler.class.getDeclaredConstructor(Looper.class, Handler.Callback.class, Boolean.TYPE).newInstance(looper, null, Boolean.TRUE);
} catch (IllegalAccessException e) {
e = e;
Log.w(TAG, "Unable to invoke Handler(Looper, Callback, boolean) constructor", e);
return new Handler(looper);
} catch (InstantiationException e2) {
e = e2;
Log.w(TAG, "Unable to invoke Handler(Looper, Callback, boolean) constructor", e);
return new Handler(looper);
} catch (NoSuchMethodException e3) {
e = e3;
Log.w(TAG, "Unable to invoke Handler(Looper, Callback, boolean) constructor", e);
return new Handler(looper);
} catch (InvocationTargetException e4) {
Throwable cause = e4.getCause();
if (cause instanceof RuntimeException) {
throw ((RuntimeException) cause);
}
if (cause instanceof Error) {
throw ((Error) cause);
}
throw new RuntimeException(cause);
}
}
@NonNull
public static Handler createAsync(@NonNull Looper looper, @NonNull Handler.Callback callback) {
if (Build.VERSION.SDK_INT >= 28) {
return Api28Impl.createAsync(looper, callback);
}
try {
return (Handler) Handler.class.getDeclaredConstructor(Looper.class, Handler.Callback.class, Boolean.TYPE).newInstance(looper, callback, Boolean.TRUE);
} catch (IllegalAccessException e) {
e = e;
Log.w(TAG, "Unable to invoke Handler(Looper, Callback, boolean) constructor", e);
return new Handler(looper, callback);
} catch (InstantiationException e2) {
e = e2;
Log.w(TAG, "Unable to invoke Handler(Looper, Callback, boolean) constructor", e);
return new Handler(looper, callback);
} catch (NoSuchMethodException e3) {
e = e3;
Log.w(TAG, "Unable to invoke Handler(Looper, Callback, boolean) constructor", e);
return new Handler(looper, callback);
} catch (InvocationTargetException e4) {
Throwable cause = e4.getCause();
if (cause instanceof RuntimeException) {
throw ((RuntimeException) cause);
}
if (cause instanceof Error) {
throw ((Error) cause);
}
throw new RuntimeException(cause);
}
}
public static boolean postDelayed(@NonNull Handler handler, @NonNull Runnable runnable, @Nullable Object obj, long j) {
if (Build.VERSION.SDK_INT >= 28) {
return Api28Impl.postDelayed(handler, runnable, obj, j);
}
Message obtain = Message.obtain(handler, runnable);
obtain.obj = obj;
return handler.sendMessageDelayed(obtain, j);
}
public static boolean hasCallbacks(@NonNull Handler handler, @NonNull Runnable runnable) {
if (Build.VERSION.SDK_INT >= 29) {
return Api29Impl.hasCallbacks(handler, runnable);
}
try {
return ((Boolean) Handler.class.getMethod("hasCallbacks", Runnable.class).invoke(handler, runnable)).booleanValue();
} catch (IllegalAccessException e) {
e = e;
throw new UnsupportedOperationException("Failed to call Handler.hasCallbacks(), but there is no safe failure mode for this method. Raising exception.", e);
} catch (NoSuchMethodException e2) {
e = e2;
throw new UnsupportedOperationException("Failed to call Handler.hasCallbacks(), but there is no safe failure mode for this method. Raising exception.", e);
} catch (NullPointerException e3) {
e = e3;
throw new UnsupportedOperationException("Failed to call Handler.hasCallbacks(), but there is no safe failure mode for this method. Raising exception.", e);
} catch (InvocationTargetException e4) {
Throwable cause = e4.getCause();
if (cause instanceof RuntimeException) {
throw ((RuntimeException) cause);
}
if (cause instanceof Error) {
throw ((Error) cause);
}
throw new RuntimeException(cause);
}
}
private HandlerCompat() {
}
@RequiresApi(29)
public static class Api29Impl {
private Api29Impl() {
}
public static boolean hasCallbacks(Handler handler, Runnable runnable) {
return handler.hasCallbacks(runnable);
}
}
@RequiresApi(28)
public static class Api28Impl {
private Api28Impl() {
}
public static Handler createAsync(Looper looper) {
return Handler.createAsync(looper);
}
public static Handler createAsync(Looper looper, Handler.Callback callback) {
return Handler.createAsync(looper, callback);
}
public static boolean postDelayed(Handler handler, Runnable runnable, Object obj, long j) {
return handler.postDelayed(runnable, obj, j);
}
}
}

View File

@@ -0,0 +1,17 @@
package androidx.core.os;
import kotlin.jvm.functions.Function0;
/* loaded from: classes.dex */
public final class HandlerKt$postAtTime$runnable$1 implements Runnable {
final /* synthetic */ Function0 $action;
public HandlerKt$postAtTime$runnable$1(Function0 function0) {
this.$action = function0;
}
@Override // java.lang.Runnable
public final void run() {
this.$action.invoke();
}
}

View File

@@ -0,0 +1,17 @@
package androidx.core.os;
import kotlin.jvm.functions.Function0;
/* loaded from: classes.dex */
public final class HandlerKt$postDelayed$runnable$1 implements Runnable {
final /* synthetic */ Function0 $action;
public HandlerKt$postDelayed$runnable$1(Function0 function0) {
this.$action = function0;
}
@Override // java.lang.Runnable
public final void run() {
this.$action.invoke();
}
}

View File

@@ -0,0 +1,45 @@
package androidx.core.os;
import android.os.Handler;
import kotlin.jvm.functions.Function0;
/* loaded from: classes.dex */
public final class HandlerKt {
public static final Runnable postDelayed(Handler handler, long j, Object obj, Function0 function0) {
HandlerKt$postDelayed$runnable$1 handlerKt$postDelayed$runnable$1 = new HandlerKt$postDelayed$runnable$1(function0);
if (obj == null) {
handler.postDelayed(handlerKt$postDelayed$runnable$1, j);
} else {
HandlerCompat.postDelayed(handler, handlerKt$postDelayed$runnable$1, obj, j);
}
return handlerKt$postDelayed$runnable$1;
}
public static /* synthetic */ Runnable postDelayed$default(Handler handler, long j, Object obj, Function0 function0, int i, Object obj2) {
if ((i & 2) != 0) {
obj = null;
}
HandlerKt$postDelayed$runnable$1 handlerKt$postDelayed$runnable$1 = new HandlerKt$postDelayed$runnable$1(function0);
if (obj == null) {
handler.postDelayed(handlerKt$postDelayed$runnable$1, j);
} else {
HandlerCompat.postDelayed(handler, handlerKt$postDelayed$runnable$1, obj, j);
}
return handlerKt$postDelayed$runnable$1;
}
public static final Runnable postAtTime(Handler handler, long j, Object obj, Function0 function0) {
HandlerKt$postAtTime$runnable$1 handlerKt$postAtTime$runnable$1 = new HandlerKt$postAtTime$runnable$1(function0);
handler.postAtTime(handlerKt$postAtTime$runnable$1, obj, j);
return handlerKt$postAtTime$runnable$1;
}
public static /* synthetic */ Runnable postAtTime$default(Handler handler, long j, Object obj, Function0 function0, int i, Object obj2) {
if ((i & 2) != 0) {
obj = null;
}
HandlerKt$postAtTime$runnable$1 handlerKt$postAtTime$runnable$1 = new HandlerKt$postAtTime$runnable$1(function0);
handler.postAtTime(handlerKt$postAtTime$runnable$1, obj, j);
return handlerKt$postAtTime$runnable$1;
}
}

View File

@@ -0,0 +1,50 @@
package androidx.core.os;
import android.os.Bundle;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
@RequiresApi(api = 35)
/* loaded from: classes.dex */
public final class HeapProfileRequestBuilder extends ProfilingRequestBuilder<HeapProfileRequestBuilder> {
private final Bundle mParams = new Bundle();
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public Bundle getParams() {
return this.mParams;
}
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public int getProfilingType() {
return 2;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public HeapProfileRequestBuilder getThis() {
return this;
}
public final HeapProfileRequestBuilder setBufferSizeKb(int i) {
this.mParams.putInt("KEY_SIZE_KB", i);
return this;
}
public final HeapProfileRequestBuilder setDurationMs(int i) {
this.mParams.putInt("KEY_DURATION_MS", i);
return this;
}
public final HeapProfileRequestBuilder setSamplingIntervalBytes(long j) {
this.mParams.putLong("KEY_SAMPLING_INTERVAL_BYTES", j);
return this;
}
public final HeapProfileRequestBuilder setTrackJavaAllocations(boolean z) {
this.mParams.putBoolean("KEY_TRACK_JAVA_ALLOCATIONS", z);
return this;
}
}

View File

@@ -0,0 +1,35 @@
package androidx.core.os;
import android.os.Bundle;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
@RequiresApi(api = 35)
/* loaded from: classes.dex */
public final class JavaHeapDumpRequestBuilder extends ProfilingRequestBuilder<JavaHeapDumpRequestBuilder> {
private final Bundle mParams = new Bundle();
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public Bundle getParams() {
return this.mParams;
}
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public int getProfilingType() {
return 1;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public JavaHeapDumpRequestBuilder getThis() {
return this;
}
public final JavaHeapDumpRequestBuilder setBufferSizeKb(int i) {
this.mParams.putInt("KEY_SIZE_KB", i);
return this;
}
}

View File

@@ -0,0 +1,5 @@
package androidx.core.os;
/* loaded from: classes.dex */
public abstract /* synthetic */ class LocaleListCompat$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,210 @@
package androidx.core.os;
import android.os.Build;
import android.os.LocaleList;
import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.Size;
import androidx.core.text.ICUCompat;
import com.ironsource.v8;
import java.util.Locale;
/* loaded from: classes.dex */
public final class LocaleListCompat {
private static final LocaleListCompat sEmptyLocaleList = create(new Locale[0]);
private final LocaleListInterface mImpl;
@NonNull
public static LocaleListCompat getEmptyLocaleList() {
return sEmptyLocaleList;
}
private LocaleListCompat(LocaleListInterface localeListInterface) {
this.mImpl = localeListInterface;
}
@RequiresApi(24)
@Deprecated
public static LocaleListCompat wrap(Object obj) {
return wrap((LocaleList) obj);
}
@NonNull
@RequiresApi(24)
public static LocaleListCompat wrap(@NonNull LocaleList localeList) {
return new LocaleListCompat(new LocaleListPlatformWrapper(localeList));
}
@Nullable
public Object unwrap() {
return this.mImpl.getLocaleList();
}
@NonNull
public static LocaleListCompat create(@NonNull Locale... localeArr) {
return wrap(Api24Impl.createLocaleList(localeArr));
}
@Nullable
public Locale get(int i) {
return this.mImpl.get(i);
}
public boolean isEmpty() {
return this.mImpl.isEmpty();
}
@IntRange(from = 0)
public int size() {
return this.mImpl.size();
}
@IntRange(from = -1)
public int indexOf(@Nullable Locale locale) {
return this.mImpl.indexOf(locale);
}
@NonNull
public String toLanguageTags() {
return this.mImpl.toLanguageTags();
}
@Nullable
public Locale getFirstMatch(@NonNull String[] strArr) {
return this.mImpl.getFirstMatch(strArr);
}
@NonNull
public static LocaleListCompat forLanguageTags(@Nullable String str) {
if (str == null || str.isEmpty()) {
return getEmptyLocaleList();
}
String[] split = str.split(",", -1);
int length = split.length;
Locale[] localeArr = new Locale[length];
for (int i = 0; i < length; i++) {
localeArr[i] = Api21Impl.forLanguageTag(split[i]);
}
return create(localeArr);
}
public static Locale forLanguageTagCompat(String str) {
if (str.contains("-")) {
String[] split = str.split("-", -1);
if (split.length > 2) {
return new Locale(split[0], split[1], split[2]);
}
if (split.length > 1) {
return new Locale(split[0], split[1]);
}
if (split.length == 1) {
return new Locale(split[0]);
}
} else if (str.contains("_")) {
String[] split2 = str.split("_", -1);
if (split2.length > 2) {
return new Locale(split2[0], split2[1], split2[2]);
}
if (split2.length > 1) {
return new Locale(split2[0], split2[1]);
}
if (split2.length == 1) {
return new Locale(split2[0]);
}
} else {
return new Locale(str);
}
throw new IllegalArgumentException("Can not parse language tag: [" + str + v8.i.e);
}
@NonNull
@Size(min = 1)
public static LocaleListCompat getAdjustedDefault() {
return wrap(Api24Impl.getAdjustedDefault());
}
@NonNull
@Size(min = 1)
public static LocaleListCompat getDefault() {
return wrap(Api24Impl.getDefault());
}
@RequiresApi(21)
public static boolean matchesLanguageAndScript(@NonNull Locale locale, @NonNull Locale locale2) {
boolean matchesLanguageAndScript;
if (Build.VERSION.SDK_INT >= 33) {
matchesLanguageAndScript = LocaleList.matchesLanguageAndScript(locale, locale2);
return matchesLanguageAndScript;
}
return Api21Impl.matchesLanguageAndScript(locale, locale2);
}
@RequiresApi(21)
public static class Api21Impl {
private static final Locale[] PSEUDO_LOCALE = {new Locale("en", "XA"), new Locale("ar", "XB")};
private Api21Impl() {
}
public static boolean matchesLanguageAndScript(@NonNull Locale locale, @NonNull Locale locale2) {
if (locale.equals(locale2)) {
return true;
}
if (!locale.getLanguage().equals(locale2.getLanguage()) || isPseudoLocale(locale) || isPseudoLocale(locale2)) {
return false;
}
String maximizeAndGetScript = ICUCompat.maximizeAndGetScript(locale);
if (maximizeAndGetScript.isEmpty()) {
String country = locale.getCountry();
return country.isEmpty() || country.equals(locale2.getCountry());
}
return maximizeAndGetScript.equals(ICUCompat.maximizeAndGetScript(locale2));
}
private static boolean isPseudoLocale(Locale locale) {
for (Locale locale2 : PSEUDO_LOCALE) {
if (locale2.equals(locale)) {
return true;
}
}
return false;
}
public static Locale forLanguageTag(String str) {
return Locale.forLanguageTag(str);
}
}
public boolean equals(Object obj) {
return (obj instanceof LocaleListCompat) && this.mImpl.equals(((LocaleListCompat) obj).mImpl);
}
public int hashCode() {
return this.mImpl.hashCode();
}
@NonNull
public String toString() {
return this.mImpl.toString();
}
@RequiresApi(24)
public static class Api24Impl {
private Api24Impl() {
}
public static LocaleList createLocaleList(Locale... localeArr) {
return new LocaleList(localeArr);
}
public static LocaleList getAdjustedDefault() {
return LocaleList.getAdjustedDefault();
}
public static LocaleList getDefault() {
return LocaleList.getDefault();
}
}
}

View File

@@ -0,0 +1,283 @@
package androidx.core.os;
import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.VisibleForTesting;
import com.ironsource.v8;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Locale;
/* loaded from: classes.dex */
final class LocaleListCompatWrapper implements LocaleListInterface {
private final Locale[] mList;
@NonNull
private final String mStringRepresentation;
private static final Locale[] sEmptyList = new Locale[0];
private static final Locale LOCALE_EN_XA = new Locale("en", "XA");
private static final Locale LOCALE_AR_XB = new Locale("ar", "XB");
private static final Locale EN_LATN = LocaleListCompat.forLanguageTagCompat("en-Latn");
@Override // androidx.core.os.LocaleListInterface
@Nullable
public Object getLocaleList() {
return null;
}
@Override // androidx.core.os.LocaleListInterface
public String toLanguageTags() {
return this.mStringRepresentation;
}
@Override // androidx.core.os.LocaleListInterface
public Locale get(int i) {
if (i >= 0) {
Locale[] localeArr = this.mList;
if (i < localeArr.length) {
return localeArr[i];
}
}
return null;
}
@Override // androidx.core.os.LocaleListInterface
public boolean isEmpty() {
return this.mList.length == 0;
}
@Override // androidx.core.os.LocaleListInterface
public int size() {
return this.mList.length;
}
@Override // androidx.core.os.LocaleListInterface
public int indexOf(Locale locale) {
int i = 0;
while (true) {
Locale[] localeArr = this.mList;
if (i >= localeArr.length) {
return -1;
}
if (localeArr[i].equals(locale)) {
return i;
}
i++;
}
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof LocaleListCompatWrapper)) {
return false;
}
Locale[] localeArr = ((LocaleListCompatWrapper) obj).mList;
if (this.mList.length != localeArr.length) {
return false;
}
int i = 0;
while (true) {
Locale[] localeArr2 = this.mList;
if (i >= localeArr2.length) {
return true;
}
if (!localeArr2[i].equals(localeArr[i])) {
return false;
}
i++;
}
}
public int hashCode() {
int i = 1;
for (Locale locale : this.mList) {
i = (i * 31) + locale.hashCode();
}
return i;
}
@NonNull
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(v8.i.d);
int i = 0;
while (true) {
Locale[] localeArr = this.mList;
if (i < localeArr.length) {
sb.append(localeArr[i]);
if (i < this.mList.length - 1) {
sb.append(',');
}
i++;
} else {
sb.append(v8.i.e);
return sb.toString();
}
}
}
public LocaleListCompatWrapper(@NonNull Locale... localeArr) {
if (localeArr.length == 0) {
this.mList = sEmptyList;
this.mStringRepresentation = "";
return;
}
ArrayList arrayList = new ArrayList();
HashSet hashSet = new HashSet();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < localeArr.length; i++) {
Locale locale = localeArr[i];
if (locale == null) {
throw new NullPointerException("list[" + i + "] is null");
}
if (!hashSet.contains(locale)) {
Locale locale2 = (Locale) locale.clone();
arrayList.add(locale2);
toLanguageTag(sb, locale2);
if (i < localeArr.length - 1) {
sb.append(',');
}
hashSet.add(locale2);
}
}
this.mList = (Locale[]) arrayList.toArray(new Locale[0]);
this.mStringRepresentation = sb.toString();
}
@VisibleForTesting
public static void toLanguageTag(StringBuilder sb, Locale locale) {
sb.append(locale.getLanguage());
String country = locale.getCountry();
if (country == null || country.isEmpty()) {
return;
}
sb.append('-');
sb.append(locale.getCountry());
}
private static String getLikelyScript(Locale locale) {
String script = Api21Impl.getScript(locale);
return !script.isEmpty() ? script : "";
}
private static boolean isPseudoLocale(Locale locale) {
return LOCALE_EN_XA.equals(locale) || LOCALE_AR_XB.equals(locale);
}
@IntRange(from = 0, to = 1)
private static int matchScore(Locale locale, Locale locale2) {
if (locale.equals(locale2)) {
return 1;
}
if (!locale.getLanguage().equals(locale2.getLanguage()) || isPseudoLocale(locale) || isPseudoLocale(locale2)) {
return 0;
}
String likelyScript = getLikelyScript(locale);
if (!likelyScript.isEmpty()) {
return likelyScript.equals(getLikelyScript(locale2)) ? 1 : 0;
}
String country = locale.getCountry();
return (country.isEmpty() || country.equals(locale2.getCountry())) ? 1 : 0;
}
private int findFirstMatchIndex(Locale locale) {
int i = 0;
while (true) {
Locale[] localeArr = this.mList;
if (i >= localeArr.length) {
return Integer.MAX_VALUE;
}
if (matchScore(locale, localeArr[i]) > 0) {
return i;
}
i++;
}
}
/* JADX WARN: Code restructure failed: missing block: B:13:0x001b, code lost:
if (r6 < Integer.MAX_VALUE) goto L17;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private int computeFirstMatchIndex(java.util.Collection<java.lang.String> r5, boolean r6) {
/*
r4 = this;
java.util.Locale[] r0 = r4.mList
int r1 = r0.length
r2 = 1
r3 = 0
if (r1 != r2) goto L8
return r3
L8:
int r0 = r0.length
if (r0 != 0) goto Ld
r5 = -1
return r5
Ld:
r0 = 2147483647(0x7fffffff, float:NaN)
if (r6 == 0) goto L1e
java.util.Locale r6 = androidx.core.os.LocaleListCompatWrapper.EN_LATN
int r6 = r4.findFirstMatchIndex(r6)
if (r6 != 0) goto L1b
return r3
L1b:
if (r6 >= r0) goto L1e
goto L1f
L1e:
r6 = r0
L1f:
java.util.Iterator r5 = r5.iterator()
L23:
boolean r1 = r5.hasNext()
if (r1 == 0) goto L3e
java.lang.Object r1 = r5.next()
java.lang.String r1 = (java.lang.String) r1
java.util.Locale r1 = androidx.core.os.LocaleListCompat.forLanguageTagCompat(r1)
int r1 = r4.findFirstMatchIndex(r1)
if (r1 != 0) goto L3a
return r3
L3a:
if (r1 >= r6) goto L23
r6 = r1
goto L23
L3e:
if (r6 != r0) goto L41
return r3
L41:
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.core.os.LocaleListCompatWrapper.computeFirstMatchIndex(java.util.Collection, boolean):int");
}
private Locale computeFirstMatch(Collection<String> collection, boolean z) {
int computeFirstMatchIndex = computeFirstMatchIndex(collection, z);
if (computeFirstMatchIndex == -1) {
return null;
}
return this.mList[computeFirstMatchIndex];
}
@Override // androidx.core.os.LocaleListInterface
public Locale getFirstMatch(@NonNull String[] strArr) {
return computeFirstMatch(Arrays.asList(strArr), false);
}
@RequiresApi(21)
public static class Api21Impl {
private Api21Impl() {
}
public static String getScript(Locale locale) {
return locale.getScript();
}
}
}

View File

@@ -0,0 +1,26 @@
package androidx.core.os;
import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.Locale;
/* loaded from: classes.dex */
interface LocaleListInterface {
Locale get(int i);
@Nullable
Locale getFirstMatch(@NonNull String[] strArr);
Object getLocaleList();
@IntRange(from = -1)
int indexOf(Locale locale);
boolean isEmpty();
@IntRange(from = 0)
int size();
String toLanguageTags();
}

View File

@@ -0,0 +1,65 @@
package androidx.core.os;
import android.os.LocaleList;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import java.util.Locale;
@RequiresApi(24)
/* loaded from: classes.dex */
final class LocaleListPlatformWrapper implements LocaleListInterface {
private final LocaleList mLocaleList;
@Override // androidx.core.os.LocaleListInterface
public Object getLocaleList() {
return this.mLocaleList;
}
public LocaleListPlatformWrapper(Object obj) {
this.mLocaleList = (LocaleList) obj;
}
@Override // androidx.core.os.LocaleListInterface
public Locale get(int i) {
return this.mLocaleList.get(i);
}
@Override // androidx.core.os.LocaleListInterface
public boolean isEmpty() {
return this.mLocaleList.isEmpty();
}
@Override // androidx.core.os.LocaleListInterface
public int size() {
return this.mLocaleList.size();
}
@Override // androidx.core.os.LocaleListInterface
public int indexOf(Locale locale) {
return this.mLocaleList.indexOf(locale);
}
public boolean equals(Object obj) {
return this.mLocaleList.equals(((LocaleListInterface) obj).getLocaleList());
}
public int hashCode() {
return this.mLocaleList.hashCode();
}
public String toString() {
return this.mLocaleList.toString();
}
@Override // androidx.core.os.LocaleListInterface
public String toLanguageTags() {
return this.mLocaleList.toLanguageTags();
}
@Override // androidx.core.os.LocaleListInterface
@Nullable
public Locale getFirstMatch(@NonNull String[] strArr) {
return this.mLocaleList.getFirstMatch(strArr);
}
}

View File

@@ -0,0 +1,39 @@
package androidx.core.os;
import android.annotation.SuppressLint;
import android.os.Message;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
/* loaded from: classes.dex */
public final class MessageCompat {
private static boolean sTryIsAsynchronous = true;
private static boolean sTrySetAsynchronous = true;
@SuppressLint({"NewApi"})
public static void setAsynchronous(@NonNull Message message, boolean z) {
Api22Impl.setAsynchronous(message, z);
}
@SuppressLint({"NewApi"})
public static boolean isAsynchronous(@NonNull Message message) {
return Api22Impl.isAsynchronous(message);
}
private MessageCompat() {
}
@RequiresApi(22)
public static class Api22Impl {
private Api22Impl() {
}
public static boolean isAsynchronous(Message message) {
return message.isAsynchronous();
}
public static void setAsynchronous(Message message, boolean z) {
message.setAsynchronous(z);
}
}
}

View File

@@ -0,0 +1,15 @@
package androidx.core.os;
import androidx.annotation.Nullable;
import androidx.core.util.ObjectsCompat;
/* loaded from: classes.dex */
public class OperationCanceledException extends RuntimeException {
public OperationCanceledException() {
this(null);
}
public OperationCanceledException(@Nullable String str) {
super(ObjectsCompat.toString(str, "The operation has been canceled."));
}
}

View File

@@ -0,0 +1,10 @@
package androidx.core.os;
import android.os.OutcomeReceiver;
/* loaded from: classes.dex */
public abstract /* synthetic */ class OutcomeReceiverKt$$ExternalSyntheticApiModelOutline0 {
public static /* bridge */ /* synthetic */ OutcomeReceiver m(Object obj) {
return (OutcomeReceiver) obj;
}
}

View File

@@ -0,0 +1,14 @@
package androidx.core.os;
import android.os.OutcomeReceiver;
import androidx.annotation.RequiresApi;
import kotlin.coroutines.Continuation;
@RequiresApi(31)
/* loaded from: classes.dex */
public final class OutcomeReceiverKt {
@RequiresApi(31)
public static final <R, E extends Throwable> OutcomeReceiver asOutcomeReceiver(Continuation continuation) {
return OutcomeReceiverKt$$ExternalSyntheticApiModelOutline0.m(new ContinuationOutcomeReceiver(continuation));
}
}

View File

@@ -0,0 +1,230 @@
package androidx.core.os;
import android.annotation.SuppressLint;
import android.os.BadParcelableException;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/* loaded from: classes.dex */
public final class ParcelCompat {
public static boolean readBoolean(@NonNull Parcel parcel) {
return parcel.readInt() != 0;
}
public static void writeBoolean(@NonNull Parcel parcel, boolean z) {
if (Build.VERSION.SDK_INT >= 29) {
Api29Impl.writeBoolean(parcel, z);
} else {
parcel.writeInt(z ? 1 : 0);
}
}
public static <T> void readList(@NonNull Parcel parcel, @NonNull List<? super T> list, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
Api33Impl.readList(parcel, list, classLoader, cls);
} else {
parcel.readList(list, classLoader);
}
}
@Nullable
@SuppressLint({"ConcreteCollection", "NullableCollection"})
public static <T> ArrayList<T> readArrayList(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<? extends T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return Api33Impl.readArrayList(parcel, classLoader, cls);
}
return parcel.readArrayList(classLoader);
}
@Nullable
@SuppressLint({"ArrayReturn", "NullableCollection"})
public static <T> Object[] readArray(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return Api33Impl.readArray(parcel, classLoader, cls);
}
return parcel.readArray(classLoader);
}
@Nullable
public static <T> SparseArray<T> readSparseArray(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<? extends T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return Api33Impl.readSparseArray(parcel, classLoader, cls);
}
return parcel.readSparseArray(classLoader);
}
public static <K, V> void readMap(@NonNull Parcel parcel, @NonNull Map<? super K, ? super V> map, @Nullable ClassLoader classLoader, @NonNull Class<K> cls, @NonNull Class<V> cls2) {
if (Build.VERSION.SDK_INT >= 34) {
Api33Impl.readMap(parcel, map, classLoader, cls, cls2);
} else {
parcel.readMap(map, classLoader);
}
}
@Nullable
@SuppressLint({"ConcreteCollection", "NullableCollection"})
public static <K, V> HashMap<K, V> readHashMap(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<? extends K> cls, @NonNull Class<? extends V> cls2) {
if (Build.VERSION.SDK_INT >= 34) {
return Api33Impl.readHashMap(parcel, classLoader, cls, cls2);
}
return parcel.readHashMap(classLoader);
}
@Nullable
public static <T extends Parcelable> T readParcelable(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return (T) Api33Impl.readParcelable(parcel, classLoader, cls);
}
T t = (T) parcel.readParcelable(classLoader);
if (t == null || cls.isInstance(t)) {
return t;
}
throw new BadParcelableException("Parcelable " + t.getClass() + " is not a subclass of required class " + cls.getName() + " provided in the parameter");
}
@Nullable
@RequiresApi(30)
public static <T> Parcelable.Creator<T> readParcelableCreator(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return Api33Impl.readParcelableCreator(parcel, classLoader, cls);
}
return (Parcelable.Creator<T>) Api30Impl.readParcelableCreator(parcel, classLoader);
}
/* JADX WARN: Multi-variable type inference failed */
@Nullable
@SuppressLint({"ArrayReturn", "NullableCollection"})
@Deprecated
public static <T> T[] readParcelableArray(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return (T[]) Api33Impl.readParcelableArray(parcel, classLoader, cls);
}
T[] tArr = (T[]) parcel.readParcelableArray(classLoader);
if (cls.isAssignableFrom(Parcelable.class)) {
return tArr;
}
T[] tArr2 = (T[]) ((Object[]) Array.newInstance((Class<?>) cls, tArr.length));
for (int i = 0; i < tArr.length; i++) {
try {
tArr2[i] = cls.cast(tArr[i]);
} catch (ClassCastException unused) {
throw new BadParcelableException("Parcelable at index " + i + " is not a subclass of required class " + cls.getName() + " provided in the parameter");
}
}
return tArr2;
}
@Nullable
@SuppressLint({"ArrayReturn", "NullableCollection"})
public static <T> Parcelable[] readParcelableArrayTyped(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return (Parcelable[]) Api33Impl.readParcelableArray(parcel, classLoader, cls);
}
return parcel.readParcelableArray(classLoader);
}
@NonNull
@RequiresApi(api = 29)
public static <T> List<T> readParcelableList(@NonNull Parcel parcel, @NonNull List<T> list, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
if (Build.VERSION.SDK_INT >= 34) {
return Api33Impl.readParcelableList(parcel, list, classLoader, cls);
}
return Api29Impl.readParcelableList(parcel, list, classLoader);
}
@Nullable
public static <T extends Serializable> T readSerializable(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
if (Build.VERSION.SDK_INT >= 33) {
return (T) Api33Impl.readSerializable(parcel, classLoader, cls);
}
return (T) parcel.readSerializable();
}
private ParcelCompat() {
}
@RequiresApi(29)
public static class Api29Impl {
private Api29Impl() {
}
public static <T extends Parcelable> List<T> readParcelableList(@NonNull Parcel parcel, @NonNull List<T> list, @Nullable ClassLoader classLoader) {
return parcel.readParcelableList(list, classLoader);
}
public static void writeBoolean(@NonNull Parcel parcel, boolean z) {
parcel.writeBoolean(z);
}
}
@RequiresApi(30)
public static class Api30Impl {
private Api30Impl() {
}
public static Parcelable.Creator<?> readParcelableCreator(@NonNull Parcel parcel, @Nullable ClassLoader classLoader) {
return parcel.readParcelableCreator(classLoader);
}
}
@RequiresApi(33)
public static class Api33Impl {
private Api33Impl() {
}
public static <T extends Serializable> T readSerializable(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
return (T) parcel.readSerializable(classLoader, cls);
}
public static <T extends Parcelable> T readParcelable(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
return (T) parcel.readParcelable(classLoader, cls);
}
public static <T> Parcelable.Creator<T> readParcelableCreator(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
return parcel.readParcelableCreator(classLoader, cls);
}
public static <T> T[] readParcelableArray(@NonNull Parcel parcel, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
return (T[]) parcel.readParcelableArray(classLoader, cls);
}
public static <T> List<T> readParcelableList(@NonNull Parcel parcel, @NonNull List<T> list, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
return parcel.readParcelableList(list, classLoader, cls);
}
public static <T> void readList(@NonNull Parcel parcel, @NonNull List<? super T> list, @Nullable ClassLoader classLoader, @NonNull Class<T> cls) {
parcel.readList(list, classLoader, cls);
}
public static <T> ArrayList<T> readArrayList(Parcel parcel, ClassLoader classLoader, Class<? extends T> cls) {
return parcel.readArrayList(classLoader, cls);
}
public static <T> T[] readArray(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
return (T[]) parcel.readArray(classLoader, cls);
}
public static <T> SparseArray<T> readSparseArray(Parcel parcel, ClassLoader classLoader, Class<? extends T> cls) {
return parcel.readSparseArray(classLoader, cls);
}
public static <K, V> void readMap(Parcel parcel, Map<? super K, ? super V> map, ClassLoader classLoader, Class<K> cls, Class<V> cls2) {
parcel.readMap(map, classLoader, cls, cls2);
}
public static <V, K> HashMap<K, V> readHashMap(Parcel parcel, ClassLoader classLoader, Class<? extends K> cls, Class<? extends V> cls2) {
return parcel.readHashMap(classLoader, cls, cls2);
}
}
}

View File

@@ -0,0 +1,39 @@
package androidx.core.os;
import android.os.Parcel;
import android.os.Parcelable;
@Deprecated
/* loaded from: classes.dex */
public final class ParcelableCompat {
@Deprecated
public static <T> Parcelable.Creator<T> newCreator(ParcelableCompatCreatorCallbacks<T> parcelableCompatCreatorCallbacks) {
return new ParcelableCompatCreatorHoneycombMR2(parcelableCompatCreatorCallbacks);
}
public static class ParcelableCompatCreatorHoneycombMR2<T> implements Parcelable.ClassLoaderCreator<T> {
private final ParcelableCompatCreatorCallbacks<T> mCallbacks;
public ParcelableCompatCreatorHoneycombMR2(ParcelableCompatCreatorCallbacks<T> parcelableCompatCreatorCallbacks) {
this.mCallbacks = parcelableCompatCreatorCallbacks;
}
@Override // android.os.Parcelable.Creator
public T createFromParcel(Parcel parcel) {
return this.mCallbacks.createFromParcel(parcel, null);
}
@Override // android.os.Parcelable.ClassLoaderCreator
public T createFromParcel(Parcel parcel, ClassLoader classLoader) {
return this.mCallbacks.createFromParcel(parcel, classLoader);
}
@Override // android.os.Parcelable.Creator
public T[] newArray(int i) {
return this.mCallbacks.newArray(i);
}
}
private ParcelableCompat() {
}
}

View File

@@ -0,0 +1,11 @@
package androidx.core.os;
import android.os.Parcel;
@Deprecated
/* loaded from: classes.dex */
public interface ParcelableCompatCreatorCallbacks<T> {
T createFromParcel(Parcel parcel, ClassLoader classLoader);
T[] newArray(int i);
}

View File

@@ -0,0 +1,76 @@
package androidx.core.os;
import android.os.PersistableBundle;
import androidx.annotation.RequiresApi;
import kotlin.jvm.internal.Intrinsics;
@RequiresApi(21)
/* loaded from: classes.dex */
final class PersistableBundleApi21ImplKt {
public static final PersistableBundleApi21ImplKt INSTANCE = new PersistableBundleApi21ImplKt();
private PersistableBundleApi21ImplKt() {
}
public static final PersistableBundle createPersistableBundle(int i) {
return new PersistableBundle(i);
}
public static final void putValue(PersistableBundle persistableBundle, String str, Object obj) {
if (obj == null) {
persistableBundle.putString(str, null);
return;
}
if (obj instanceof Boolean) {
PersistableBundleApi22ImplKt.putBoolean(persistableBundle, str, ((Boolean) obj).booleanValue());
return;
}
if (obj instanceof Double) {
persistableBundle.putDouble(str, ((Number) obj).doubleValue());
return;
}
if (obj instanceof Integer) {
persistableBundle.putInt(str, ((Number) obj).intValue());
return;
}
if (obj instanceof Long) {
persistableBundle.putLong(str, ((Number) obj).longValue());
return;
}
if (obj instanceof String) {
persistableBundle.putString(str, (String) obj);
return;
}
if (obj instanceof PersistableBundle) {
persistableBundle.putPersistableBundle(str, (PersistableBundle) obj);
return;
}
if (obj instanceof boolean[]) {
PersistableBundleApi22ImplKt.putBooleanArray(persistableBundle, str, (boolean[]) obj);
return;
}
if (obj instanceof double[]) {
persistableBundle.putDoubleArray(str, (double[]) obj);
return;
}
if (obj instanceof int[]) {
persistableBundle.putIntArray(str, (int[]) obj);
return;
}
if (obj instanceof long[]) {
persistableBundle.putLongArray(str, (long[]) obj);
return;
}
if (obj instanceof Object[]) {
Class<?> componentType = obj.getClass().getComponentType();
Intrinsics.checkNotNull(componentType);
if (String.class.isAssignableFrom(componentType)) {
Intrinsics.checkNotNull(obj, "null cannot be cast to non-null type kotlin.Array<kotlin.String>");
persistableBundle.putStringArray(str, (String[]) obj);
return;
}
throw new IllegalArgumentException("Unsupported value array type " + componentType.getCanonicalName() + " for key \"" + str + '\"');
}
throw new IllegalArgumentException("Unsupported value type " + obj.getClass().getCanonicalName() + " for key \"" + str + '\"');
}
}

View File

@@ -0,0 +1,21 @@
package androidx.core.os;
import android.os.PersistableBundle;
import androidx.annotation.RequiresApi;
@RequiresApi(22)
/* loaded from: classes.dex */
final class PersistableBundleApi22ImplKt {
public static final PersistableBundleApi22ImplKt INSTANCE = new PersistableBundleApi22ImplKt();
private PersistableBundleApi22ImplKt() {
}
public static final void putBoolean(PersistableBundle persistableBundle, String str, boolean z) {
persistableBundle.putBoolean(str, z);
}
public static final void putBooleanArray(PersistableBundle persistableBundle, String str, boolean[] zArr) {
persistableBundle.putBooleanArray(str, zArr);
}
}

View File

@@ -0,0 +1,34 @@
package androidx.core.os;
import android.os.PersistableBundle;
import androidx.annotation.RequiresApi;
import java.util.Map;
import kotlin.Pair;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nPersistableBundle.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PersistableBundle.kt\nandroidx/core/os/PersistableBundleKt\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,152:1\n13579#2,2:153\n*S KotlinDebug\n*F\n+ 1 PersistableBundle.kt\nandroidx/core/os/PersistableBundleKt\n*L\n34#1:153,2\n*E\n"})
/* loaded from: classes.dex */
public final class PersistableBundleKt {
@RequiresApi(21)
public static final PersistableBundle persistableBundleOf(Pair... pairArr) {
PersistableBundle createPersistableBundle = PersistableBundleApi21ImplKt.createPersistableBundle(pairArr.length);
for (Pair pair : pairArr) {
PersistableBundleApi21ImplKt.putValue(createPersistableBundle, (String) pair.component1(), pair.component2());
}
return createPersistableBundle;
}
@RequiresApi(21)
public static final PersistableBundle persistableBundleOf() {
return PersistableBundleApi21ImplKt.createPersistableBundle(0);
}
@RequiresApi(21)
public static final PersistableBundle toPersistableBundle(Map<String, ? extends Object> map) {
PersistableBundle createPersistableBundle = PersistableBundleApi21ImplKt.createPersistableBundle(map.size());
for (Map.Entry<String, ? extends Object> entry : map.entrySet()) {
PersistableBundleApi21ImplKt.putValue(createPersistableBundle, entry.getKey(), entry.getValue());
}
return createPersistableBundle;
}
}

View File

@@ -0,0 +1,62 @@
package androidx.core.os;
import android.annotation.SuppressLint;
import android.os.Process;
import android.os.UserHandle;
import androidx.annotation.RequiresApi;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
public final class ProcessCompat {
private ProcessCompat() {
}
public static boolean isApplicationUid(int i) {
return Api24Impl.isApplicationUid(i);
}
@RequiresApi(24)
public static class Api24Impl {
private Api24Impl() {
}
public static boolean isApplicationUid(int i) {
return Process.isApplicationUid(i);
}
}
public static class Api19Impl {
private static Method sMethodUserHandleIsAppMethod;
private static boolean sResolved;
private static final Object sResolvedLock = new Object();
private Api19Impl() {
}
@SuppressLint({"DiscouragedPrivateApi"})
public static boolean isApplicationUid(int i) {
try {
synchronized (sResolvedLock) {
try {
if (!sResolved) {
sResolved = true;
sMethodUserHandleIsAppMethod = UserHandle.class.getDeclaredMethod("isApp", Integer.TYPE);
}
} finally {
}
}
Method method = sMethodUserHandleIsAppMethod;
if (method != null) {
Boolean bool = (Boolean) method.invoke(null, Integer.valueOf(i));
if (bool == null) {
throw new NullPointerException();
}
return bool.booleanValue();
}
} catch (Exception e) {
e.printStackTrace();
}
return true;
}
}
}

View File

@@ -0,0 +1,101 @@
package androidx.core.os;
import android.content.Context;
import android.os.ProfilingManager;
import android.os.ProfilingResult;
import java.util.concurrent.Executor;
import java.util.function.Consumer;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.channels.ProduceKt;
import kotlinx.coroutines.channels.ProducerScope;
@DebugMetadata(c = "androidx.core.os.Profiling$registerForAllProfilingResults$1", f = "Profiling.kt", l = {79}, m = "invokeSuspend")
/* loaded from: classes.dex */
public final class Profiling$registerForAllProfilingResults$1 extends SuspendLambda implements Function2 {
final /* synthetic */ Context $context;
private /* synthetic */ Object L$0;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Profiling$registerForAllProfilingResults$1(Context context, Continuation continuation) {
super(2, continuation);
this.$context = context;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
Profiling$registerForAllProfilingResults$1 profiling$registerForAllProfilingResults$1 = new Profiling$registerForAllProfilingResults$1(this.$context, continuation);
profiling$registerForAllProfilingResults$1.L$0 = obj;
return profiling$registerForAllProfilingResults$1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(ProducerScope producerScope, Continuation continuation) {
return ((Profiling$registerForAllProfilingResults$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
final ProducerScope producerScope = (ProducerScope) this.L$0;
final Consumer consumer = new Consumer() { // from class: androidx.core.os.Profiling$registerForAllProfilingResults$1$$ExternalSyntheticLambda0
@Override // java.util.function.Consumer
public final void accept(Object obj2) {
Profiling$registerForAllProfilingResults$1.invokeSuspend$lambda$0(ProducerScope.this, (ProfilingResult) obj2);
}
};
final ProfilingManager profilingManager = (ProfilingManager) this.$context.getSystemService(ProfilingManager.class);
profilingManager.registerForAllProfilingResults(new Executor() { // from class: androidx.core.os.Profiling$registerForAllProfilingResults$1$$ExternalSyntheticLambda1
@Override // java.util.concurrent.Executor
public final void execute(Runnable runnable) {
runnable.run();
}
}, consumer);
Function0 function0 = new Function0() { // from class: androidx.core.os.Profiling$registerForAllProfilingResults$1.2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public /* bridge */ /* synthetic */ Object invoke() {
m58invoke();
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: collision with other method in class */
public final void m58invoke() {
profilingManager.unregisterForAllProfilingResults(consumer);
}
};
this.label = 1;
if (ProduceKt.awaitClose(producerScope, function0, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public static final void invokeSuspend$lambda$0(ProducerScope producerScope, ProfilingResult result) {
Intrinsics.checkNotNullExpressionValue(result, "result");
producerScope.mo4126trySendJP2dKIU(result);
}
}

View File

@@ -0,0 +1,51 @@
package androidx.core.os;
import android.content.Context;
import android.os.ProfilingManager;
import android.os.ProfilingResult;
import androidx.annotation.RequiresApi;
import java.util.concurrent.Executor;
import java.util.function.Consumer;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowKt;
/* loaded from: classes.dex */
public final class Profiling {
private static final String KEY_BUFFER_FILL_POLICY = "KEY_BUFFER_FILL_POLICY";
private static final String KEY_DURATION_MS = "KEY_DURATION_MS";
private static final String KEY_FREQUENCY_HZ = "KEY_FREQUENCY_HZ";
private static final String KEY_SAMPLING_INTERVAL_BYTES = "KEY_SAMPLING_INTERVAL_BYTES";
private static final String KEY_SIZE_KB = "KEY_SIZE_KB";
private static final String KEY_TRACK_JAVA_ALLOCATIONS = "KEY_TRACK_JAVA_ALLOCATIONS";
private static final int VALUE_BUFFER_FILL_POLICY_DISCARD = 1;
private static final int VALUE_BUFFER_FILL_POLICY_RING_BUFFER = 2;
@RequiresApi(api = 35)
public static final Flow registerForAllProfilingResults(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return FlowKt.callbackFlow(new Profiling$registerForAllProfilingResults$1(context, null));
}
@RequiresApi(api = 35)
public static final void registerForAllProfilingResults(Context context, Executor executor, Consumer<ProfilingResult> listener) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(executor, "executor");
Intrinsics.checkNotNullParameter(listener, "listener");
((ProfilingManager) context.getSystemService(ProfilingManager.class)).registerForAllProfilingResults(executor, listener);
}
@RequiresApi(api = 35)
public static final void unregisterForAllProfilingResults(Context context, Consumer<ProfilingResult> listener) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(listener, "listener");
((ProfilingManager) context.getSystemService(ProfilingManager.class)).unregisterForAllProfilingResults(listener);
}
@RequiresApi(api = 35)
public static final void requestProfiling(Context context, ProfilingRequest profilingRequest, Executor executor, Consumer<ProfilingResult> consumer) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(profilingRequest, "profilingRequest");
((ProfilingManager) context.getSystemService(ProfilingManager.class)).requestProfiling(profilingRequest.getProfilingType(), profilingRequest.getParams(), profilingRequest.getTag(), profilingRequest.getCancellationSignal(), executor, consumer);
}
}

View File

@@ -0,0 +1,38 @@
package androidx.core.os;
import android.os.Bundle;
import androidx.annotation.RequiresApi;
import kotlin.jvm.internal.Intrinsics;
@RequiresApi(api = 35)
/* loaded from: classes.dex */
public final class ProfilingRequest {
private final android.os.CancellationSignal cancellationSignal;
private final Bundle params;
private final int profilingType;
private final String tag;
public final android.os.CancellationSignal getCancellationSignal() {
return this.cancellationSignal;
}
public final Bundle getParams() {
return this.params;
}
public final int getProfilingType() {
return this.profilingType;
}
public final String getTag() {
return this.tag;
}
public ProfilingRequest(int i, Bundle params, String str, android.os.CancellationSignal cancellationSignal) {
Intrinsics.checkNotNullParameter(params, "params");
this.profilingType = i;
this.params = params;
this.tag = str;
this.cancellationSignal = cancellationSignal;
}
}

View File

@@ -0,0 +1,39 @@
package androidx.core.os;
import android.os.Bundle;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
import androidx.core.os.ProfilingRequestBuilder;
import kotlin.jvm.internal.Intrinsics;
@RequiresApi(api = 35)
/* loaded from: classes.dex */
public abstract class ProfilingRequestBuilder<T extends ProfilingRequestBuilder<T>> {
private android.os.CancellationSignal mCancellationSignal;
private String mTag;
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public abstract Bundle getParams();
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public abstract int getProfilingType();
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public abstract T getThis();
public final T setTag(String tag) {
Intrinsics.checkNotNullParameter(tag, "tag");
this.mTag = tag;
return getThis();
}
public final T setCancellationSignal(android.os.CancellationSignal cancellationSignal) {
Intrinsics.checkNotNullParameter(cancellationSignal, "cancellationSignal");
this.mCancellationSignal = cancellationSignal;
return getThis();
}
public final ProfilingRequest build() {
return new ProfilingRequest(getProfilingType(), getParams(), this.mTag, this.mCancellationSignal);
}
}

View File

@@ -0,0 +1,44 @@
package androidx.core.os;
import android.os.Bundle;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
@RequiresApi(api = 35)
/* loaded from: classes.dex */
public final class StackSamplingRequestBuilder extends ProfilingRequestBuilder<StackSamplingRequestBuilder> {
private final Bundle mParams = new Bundle();
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public Bundle getParams() {
return this.mParams;
}
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public int getProfilingType() {
return 3;
}
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public StackSamplingRequestBuilder getThis() {
return this;
}
public final StackSamplingRequestBuilder setBufferSizeKb(int i) {
this.mParams.putInt("KEY_SIZE_KB", i);
return this;
}
public final StackSamplingRequestBuilder setDurationMs(int i) {
this.mParams.putInt("KEY_DURATION_MS", i);
return this;
}
public final StackSamplingRequestBuilder setSamplingFrequencyHz(int i) {
this.mParams.putInt("KEY_FREQUENCY_HZ", i);
return this;
}
}

View File

@@ -0,0 +1,46 @@
package androidx.core.os;
import android.os.Bundle;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
import kotlin.jvm.internal.Intrinsics;
@RequiresApi(api = 35)
/* loaded from: classes.dex */
public final class SystemTraceRequestBuilder extends ProfilingRequestBuilder<SystemTraceRequestBuilder> {
private final Bundle mParams = new Bundle();
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public Bundle getParams() {
return this.mParams;
}
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public int getProfilingType() {
return 4;
}
@Override // androidx.core.os.ProfilingRequestBuilder
@RestrictTo({RestrictTo.Scope.SUBCLASSES})
public SystemTraceRequestBuilder getThis() {
return this;
}
public final SystemTraceRequestBuilder setBufferSizeKb(int i) {
this.mParams.putInt("KEY_SIZE_KB", i);
return this;
}
public final SystemTraceRequestBuilder setDurationMs(int i) {
this.mParams.putInt("KEY_DURATION_MS", i);
return this;
}
public final SystemTraceRequestBuilder setBufferFillPolicy(BufferFillPolicy bufferFillPolicy) {
Intrinsics.checkNotNullParameter(bufferFillPolicy, "bufferFillPolicy");
this.mParams.putInt("KEY_BUFFER_FILL_POLICY", bufferFillPolicy.getValue$core_release());
return this;
}
}

View File

@@ -0,0 +1,110 @@
package androidx.core.os;
import android.os.Build;
import android.os.Trace;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import java.lang.reflect.Method;
@Deprecated
/* loaded from: classes.dex */
public final class TraceCompat {
private static final String TAG = "TraceCompat";
private static Method sAsyncTraceBeginMethod;
private static Method sAsyncTraceEndMethod;
private static Method sIsTagEnabledMethod;
private static Method sTraceCounterMethod;
private static long sTraceTagApp;
static {
if (Build.VERSION.SDK_INT < 29) {
try {
sTraceTagApp = Trace.class.getField("TRACE_TAG_APP").getLong(null);
Class cls = Long.TYPE;
sIsTagEnabledMethod = Trace.class.getMethod("isTagEnabled", cls);
Class cls2 = Integer.TYPE;
sAsyncTraceBeginMethod = Trace.class.getMethod("asyncTraceBegin", cls, String.class, cls2);
sAsyncTraceEndMethod = Trace.class.getMethod("asyncTraceEnd", cls, String.class, cls2);
sTraceCounterMethod = Trace.class.getMethod("traceCounter", cls, String.class, cls2);
} catch (Exception unused) {
}
}
}
public static boolean isEnabled() {
if (Build.VERSION.SDK_INT >= 29) {
return Api29Impl.isEnabled();
}
try {
return ((Boolean) sIsTagEnabledMethod.invoke(null, Long.valueOf(sTraceTagApp))).booleanValue();
} catch (Exception unused) {
return false;
}
}
public static void beginSection(@NonNull String str) {
Trace.beginSection(str);
}
public static void endSection() {
Trace.endSection();
}
public static void beginAsyncSection(@NonNull String str, int i) {
if (Build.VERSION.SDK_INT >= 29) {
Api29Impl.beginAsyncSection(str, i);
} else {
try {
sAsyncTraceBeginMethod.invoke(null, Long.valueOf(sTraceTagApp), str, Integer.valueOf(i));
} catch (Exception unused) {
}
}
}
public static void endAsyncSection(@NonNull String str, int i) {
if (Build.VERSION.SDK_INT >= 29) {
Api29Impl.endAsyncSection(str, i);
} else {
try {
sAsyncTraceEndMethod.invoke(null, Long.valueOf(sTraceTagApp), str, Integer.valueOf(i));
} catch (Exception unused) {
}
}
}
public static void setCounter(@NonNull String str, int i) {
if (Build.VERSION.SDK_INT >= 29) {
Api29Impl.setCounter(str, i);
} else {
try {
sTraceCounterMethod.invoke(null, Long.valueOf(sTraceTagApp), str, Integer.valueOf(i));
} catch (Exception unused) {
}
}
}
private TraceCompat() {
}
@RequiresApi(29)
public static class Api29Impl {
private Api29Impl() {
}
public static boolean isEnabled() {
return Trace.isEnabled();
}
public static void endAsyncSection(String str, int i) {
Trace.endAsyncSection(str, i);
}
public static void beginAsyncSection(String str, int i) {
Trace.beginAsyncSection(str, i);
}
public static void setCounter(String str, long j) {
Trace.setCounter(str, j);
}
}
}

View File

@@ -0,0 +1,19 @@
package androidx.core.os;
import android.os.Trace;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.InlineMarker;
/* loaded from: classes.dex */
public final class TraceKt {
public static final <T> T trace(String str, Function0 function0) {
Trace.beginSection(str);
try {
return (T) function0.invoke();
} finally {
InlineMarker.finallyStart(1);
Trace.endSection();
InlineMarker.finallyEnd(1);
}
}
}

View File

@@ -0,0 +1,55 @@
package androidx.core.os;
import android.os.UserHandle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
public class UserHandleCompat {
@Nullable
private static Method sGetUserIdMethod;
@Nullable
private static Constructor<UserHandle> sUserHandleConstructor;
private UserHandleCompat() {
}
@NonNull
public static UserHandle getUserHandleForUid(int i) {
return Api24Impl.getUserHandleForUid(i);
}
@RequiresApi(24)
public static class Api24Impl {
private Api24Impl() {
}
@NonNull
public static UserHandle getUserHandleForUid(int i) {
return UserHandle.getUserHandleForUid(i);
}
}
private static Method getGetUserIdMethod() throws NoSuchMethodException {
if (sGetUserIdMethod == null) {
Method declaredMethod = UserHandle.class.getDeclaredMethod("getUserId", Integer.TYPE);
sGetUserIdMethod = declaredMethod;
declaredMethod.setAccessible(true);
}
return sGetUserIdMethod;
}
private static Constructor<UserHandle> getUserHandleConstructor() throws NoSuchMethodException {
if (sUserHandleConstructor == null) {
Constructor<UserHandle> declaredConstructor = UserHandle.class.getDeclaredConstructor(Integer.TYPE);
sUserHandleConstructor = declaredConstructor;
declaredConstructor.setAccessible(true);
}
return sUserHandleConstructor;
}
}

View File

@@ -0,0 +1,26 @@
package androidx.core.os;
import android.content.Context;
import android.os.UserManager;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
/* loaded from: classes.dex */
public class UserManagerCompat {
private UserManagerCompat() {
}
public static boolean isUserUnlocked(@NonNull Context context) {
return Api24Impl.isUserUnlocked(context);
}
@RequiresApi(24)
public static class Api24Impl {
private Api24Impl() {
}
public static boolean isUserUnlocked(Context context) {
return ((UserManager) context.getSystemService(UserManager.class)).isUserUnlocked();
}
}
}