ADD week 5
This commit is contained in:
71
02-Easy5/E5/sources/androidx/core/os/BuildCompat.java
Normal file
71
02-Easy5/E5/sources/androidx/core/os/BuildCompat.java
Normal file
@ -0,0 +1,71 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Build;
|
||||
import java.util.Locale;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class BuildCompat {
|
||||
|
||||
public @interface PrereleaseSdkCheck {
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isAtLeastN() {
|
||||
return Build.VERSION.SDK_INT >= 24;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isAtLeastNMR1() {
|
||||
return Build.VERSION.SDK_INT >= 25;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isAtLeastO() {
|
||||
return Build.VERSION.SDK_INT >= 26;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isAtLeastOMR1() {
|
||||
return Build.VERSION.SDK_INT >= 27;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isAtLeastP() {
|
||||
return Build.VERSION.SDK_INT >= 28;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isAtLeastQ() {
|
||||
return Build.VERSION.SDK_INT >= 29;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isAtLeastR() {
|
||||
return Build.VERSION.SDK_INT >= 30;
|
||||
}
|
||||
|
||||
private BuildCompat() {
|
||||
}
|
||||
|
||||
protected static boolean isAtLeastPreReleaseCodename(String str, String str2) {
|
||||
return !"REL".equals(str2) && str2.toUpperCase(Locale.ROOT).compareTo(str.toUpperCase(Locale.ROOT)) >= 0;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isAtLeastS() {
|
||||
return Build.VERSION.SDK_INT >= 31 || (Build.VERSION.SDK_INT >= 30 && isAtLeastPreReleaseCodename("S", Build.VERSION.CODENAME));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isAtLeastSv2() {
|
||||
return Build.VERSION.SDK_INT >= 32 || (Build.VERSION.SDK_INT >= 31 && isAtLeastPreReleaseCodename("Sv2", Build.VERSION.CODENAME));
|
||||
}
|
||||
|
||||
public static boolean isAtLeastT() {
|
||||
return Build.VERSION.SDK_INT >= 33 || (Build.VERSION.SDK_INT >= 32 && isAtLeastPreReleaseCodename("Tiramisu", Build.VERSION.CODENAME));
|
||||
}
|
||||
|
||||
public static boolean isAtLeastU() {
|
||||
return Build.VERSION.SDK_INT >= 33 && isAtLeastPreReleaseCodename("UpsideDownCake", Build.VERSION.CODENAME);
|
||||
}
|
||||
}
|
24
02-Easy5/E5/sources/androidx/core/os/BundleApi18ImplKt.java
Normal file
24
02-Easy5/E5/sources/androidx/core/os/BundleApi18ImplKt.java
Normal file
@ -0,0 +1,24 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.JvmStatic;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: Bundle.kt */
|
||||
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\bÃ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\"\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\b2\b\u0010\t\u001a\u0004\u0018\u00010\nH\u0007¨\u0006\u000b"}, d2 = {"Landroidx/core/os/BundleApi18ImplKt;", "", "()V", "putBinder", "", "bundle", "Landroid/os/Bundle;", "key", "", "value", "Landroid/os/IBinder;", "core-ktx_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class BundleApi18ImplKt {
|
||||
public static final BundleApi18ImplKt INSTANCE = new BundleApi18ImplKt();
|
||||
|
||||
private BundleApi18ImplKt() {
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final void putBinder(Bundle bundle, String key, IBinder value) {
|
||||
Intrinsics.checkNotNullParameter(bundle, "bundle");
|
||||
Intrinsics.checkNotNullParameter(key, "key");
|
||||
bundle.putBinder(key, value);
|
||||
}
|
||||
}
|
32
02-Easy5/E5/sources/androidx/core/os/BundleApi21ImplKt.java
Normal file
32
02-Easy5/E5/sources/androidx/core/os/BundleApi21ImplKt.java
Normal file
@ -0,0 +1,32 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Size;
|
||||
import android.util.SizeF;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.JvmStatic;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: Bundle.kt */
|
||||
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\bÃ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\"\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\b2\b\u0010\t\u001a\u0004\u0018\u00010\nH\u0007J\"\u0010\u000b\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\b2\b\u0010\t\u001a\u0004\u0018\u00010\fH\u0007¨\u0006\r"}, d2 = {"Landroidx/core/os/BundleApi21ImplKt;", "", "()V", "putSize", "", "bundle", "Landroid/os/Bundle;", "key", "", "value", "Landroid/util/Size;", "putSizeF", "Landroid/util/SizeF;", "core-ktx_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class BundleApi21ImplKt {
|
||||
public static final BundleApi21ImplKt INSTANCE = new BundleApi21ImplKt();
|
||||
|
||||
private BundleApi21ImplKt() {
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final void putSize(Bundle bundle, String key, Size value) {
|
||||
Intrinsics.checkNotNullParameter(bundle, "bundle");
|
||||
Intrinsics.checkNotNullParameter(key, "key");
|
||||
bundle.putSize(key, value);
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final void putSizeF(Bundle bundle, String key, SizeF value) {
|
||||
Intrinsics.checkNotNullParameter(bundle, "bundle");
|
||||
Intrinsics.checkNotNullParameter(key, "key");
|
||||
bundle.putSizeF(key, value);
|
||||
}
|
||||
}
|
99
02-Easy5/E5/sources/androidx/core/os/BundleKt.java
Normal file
99
02-Easy5/E5/sources/androidx/core/os/BundleKt.java
Normal file
@ -0,0 +1,99 @@
|
||||
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.Metadata;
|
||||
import kotlin.Pair;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.text.Typography;
|
||||
|
||||
/* compiled from: Bundle.kt */
|
||||
@Metadata(d1 = {"\u0000\u001c\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\u0010\u0000\n\u0002\b\u0002\u001a\u0006\u0010\u0000\u001a\u00020\u0001\u001a;\u0010\u0000\u001a\u00020\u00012.\u0010\u0002\u001a\u0018\u0012\u0014\b\u0001\u0012\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0006\u0012\u0004\u0018\u00010\u00060\u00040\u0003\"\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0006\u0012\u0004\u0018\u00010\u00060\u0004¢\u0006\u0002\u0010\u0007¨\u0006\b"}, d2 = {"bundleOf", "Landroid/os/Bundle;", "pairs", "", "Lkotlin/Pair;", "", "", "([Lkotlin/Pair;)Landroid/os/Bundle;", "core-ktx_release"}, k = 2, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class BundleKt {
|
||||
public static final Bundle bundleOf(Pair<String, ? extends Object>... pairs) {
|
||||
Intrinsics.checkNotNullParameter(pairs, "pairs");
|
||||
Bundle bundle = new Bundle(pairs.length);
|
||||
for (Pair<String, ? extends Object> pair : pairs) {
|
||||
String component1 = pair.component1();
|
||||
Object component2 = pair.component2();
|
||||
if (component2 == null) {
|
||||
bundle.putString(component1, null);
|
||||
} else if (component2 instanceof Boolean) {
|
||||
bundle.putBoolean(component1, ((Boolean) component2).booleanValue());
|
||||
} else if (component2 instanceof Byte) {
|
||||
bundle.putByte(component1, ((Number) component2).byteValue());
|
||||
} else if (component2 instanceof Character) {
|
||||
bundle.putChar(component1, ((Character) component2).charValue());
|
||||
} else if (component2 instanceof Double) {
|
||||
bundle.putDouble(component1, ((Number) component2).doubleValue());
|
||||
} else if (component2 instanceof Float) {
|
||||
bundle.putFloat(component1, ((Number) component2).floatValue());
|
||||
} else if (component2 instanceof Integer) {
|
||||
bundle.putInt(component1, ((Number) component2).intValue());
|
||||
} else if (component2 instanceof Long) {
|
||||
bundle.putLong(component1, ((Number) component2).longValue());
|
||||
} else if (component2 instanceof Short) {
|
||||
bundle.putShort(component1, ((Number) component2).shortValue());
|
||||
} else if (component2 instanceof Bundle) {
|
||||
bundle.putBundle(component1, (Bundle) component2);
|
||||
} else if (component2 instanceof CharSequence) {
|
||||
bundle.putCharSequence(component1, (CharSequence) component2);
|
||||
} else if (component2 instanceof Parcelable) {
|
||||
bundle.putParcelable(component1, (Parcelable) component2);
|
||||
} else if (component2 instanceof boolean[]) {
|
||||
bundle.putBooleanArray(component1, (boolean[]) component2);
|
||||
} else if (component2 instanceof byte[]) {
|
||||
bundle.putByteArray(component1, (byte[]) component2);
|
||||
} else if (component2 instanceof char[]) {
|
||||
bundle.putCharArray(component1, (char[]) component2);
|
||||
} else if (component2 instanceof double[]) {
|
||||
bundle.putDoubleArray(component1, (double[]) component2);
|
||||
} else if (component2 instanceof float[]) {
|
||||
bundle.putFloatArray(component1, (float[]) component2);
|
||||
} else if (component2 instanceof int[]) {
|
||||
bundle.putIntArray(component1, (int[]) component2);
|
||||
} else if (component2 instanceof long[]) {
|
||||
bundle.putLongArray(component1, (long[]) component2);
|
||||
} else if (component2 instanceof short[]) {
|
||||
bundle.putShortArray(component1, (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(component1, (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(component1, (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(component1, (CharSequence[]) component2);
|
||||
} else if (Serializable.class.isAssignableFrom(componentType)) {
|
||||
bundle.putSerializable(component1, (Serializable) component2);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Illegal value array type " + componentType.getCanonicalName() + " for key \"" + component1 + Typography.quote);
|
||||
}
|
||||
} else if (component2 instanceof Serializable) {
|
||||
bundle.putSerializable(component1, (Serializable) component2);
|
||||
} else if (component2 instanceof IBinder) {
|
||||
BundleApi18ImplKt.putBinder(bundle, component1, (IBinder) component2);
|
||||
} else if (component2 instanceof Size) {
|
||||
BundleApi21ImplKt.putSize(bundle, component1, (Size) component2);
|
||||
} else if (component2 instanceof SizeF) {
|
||||
BundleApi21ImplKt.putSizeF(bundle, component1, (SizeF) component2);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Illegal value type " + component2.getClass().getCanonicalName() + " for key \"" + component1 + Typography.quote);
|
||||
}
|
||||
}
|
||||
return bundle;
|
||||
}
|
||||
|
||||
public static final Bundle bundleOf() {
|
||||
return new Bundle(0);
|
||||
}
|
||||
}
|
107
02-Easy5/E5/sources/androidx/core/os/CancellationSignal.java
Normal file
107
02-Easy5/E5/sources/androidx/core/os/CancellationSignal.java
Normal file
@ -0,0 +1,107 @@
|
||||
package androidx.core.os;
|
||||
|
||||
/* 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) {
|
||||
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) {
|
||||
Api16Impl.cancel(obj);
|
||||
}
|
||||
synchronized (this) {
|
||||
this.mCancelInProgress = false;
|
||||
notifyAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setOnCancelListener(OnCancelListener onCancelListener) {
|
||||
synchronized (this) {
|
||||
waitForCancelFinishedLocked();
|
||||
if (this.mOnCancelListener == onCancelListener) {
|
||||
return;
|
||||
}
|
||||
this.mOnCancelListener = onCancelListener;
|
||||
if (this.mIsCanceled && onCancelListener != null) {
|
||||
onCancelListener.onCancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Object getCancellationSignalObject() {
|
||||
Object obj;
|
||||
synchronized (this) {
|
||||
if (this.mCancellationSignalObj == null) {
|
||||
android.os.CancellationSignal createCancellationSignal = Api16Impl.createCancellationSignal();
|
||||
this.mCancellationSignalObj = createCancellationSignal;
|
||||
if (this.mIsCanceled) {
|
||||
Api16Impl.cancel(createCancellationSignal);
|
||||
}
|
||||
}
|
||||
obj = this.mCancellationSignalObj;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
private void waitForCancelFinishedLocked() {
|
||||
while (this.mCancelInProgress) {
|
||||
try {
|
||||
wait();
|
||||
} catch (InterruptedException unused) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class Api16Impl {
|
||||
private Api16Impl() {
|
||||
}
|
||||
|
||||
static void cancel(Object obj) {
|
||||
((android.os.CancellationSignal) obj).cancel();
|
||||
}
|
||||
|
||||
static android.os.CancellationSignal createCancellationSignal() {
|
||||
return new android.os.CancellationSignal();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.os.LocaleList;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ConfigurationCompat {
|
||||
private ConfigurationCompat() {
|
||||
}
|
||||
|
||||
public static LocaleListCompat getLocales(Configuration configuration) {
|
||||
return Build.VERSION.SDK_INT >= 24 ? LocaleListCompat.wrap(Api24Impl.getLocales(configuration)) : LocaleListCompat.create(configuration.locale);
|
||||
}
|
||||
|
||||
static class Api24Impl {
|
||||
private Api24Impl() {
|
||||
}
|
||||
|
||||
static LocaleList getLocales(Configuration configuration) {
|
||||
return configuration.getLocales();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.OutcomeReceiver;
|
||||
import java.lang.Throwable;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Result;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: OutcomeReceiver.kt */
|
||||
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0006\n\u0002\u0010\u000e\n\u0000\b\u0003\u0018\u0000*\u0004\b\u0000\u0010\u0001*\b\b\u0001\u0010\u0002*\u00020\u00032\u000e\u0012\u0004\u0012\u0002H\u0001\u0012\u0004\u0012\u0002H\u00020\u00042\u00020\u0005B\u0013\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00028\u00000\u0007¢\u0006\u0002\u0010\bJ\u0015\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00028\u0001H\u0016¢\u0006\u0002\u0010\fJ\u0015\u0010\r\u001a\u00020\n2\u0006\u0010\u000e\u001a\u00028\u0000H\u0016¢\u0006\u0002\u0010\u000fJ\b\u0010\u0010\u001a\u00020\u0011H\u0016R\u0014\u0010\u0006\u001a\b\u0012\u0004\u0012\u00028\u00000\u0007X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0012"}, d2 = {"Landroidx/core/os/ContinuationOutcomeReceiver;", "R", "E", "", "Landroid/os/OutcomeReceiver;", "Ljava/util/concurrent/atomic/AtomicBoolean;", "continuation", "Lkotlin/coroutines/Continuation;", "(Lkotlin/coroutines/Continuation;)V", "onError", "", "error", "(Ljava/lang/Throwable;)V", "onResult", "result", "(Ljava/lang/Object;)V", "toString", "", "core-ktx_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class ContinuationOutcomeReceiver<R, E extends Throwable> extends AtomicBoolean implements OutcomeReceiver<R, E> {
|
||||
private final Continuation<R> continuation;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public ContinuationOutcomeReceiver(Continuation<? super R> continuation) {
|
||||
super(false);
|
||||
Intrinsics.checkNotNullParameter(continuation, "continuation");
|
||||
this.continuation = continuation;
|
||||
}
|
||||
|
||||
@Override // android.os.OutcomeReceiver
|
||||
public void onResult(R result) {
|
||||
if (compareAndSet(false, true)) {
|
||||
Continuation<R> continuation = this.continuation;
|
||||
Result.Companion companion = Result.INSTANCE;
|
||||
continuation.resumeWith(Result.m288constructorimpl(result));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.os.OutcomeReceiver
|
||||
public void onError(E error) {
|
||||
Intrinsics.checkNotNullParameter(error, "error");
|
||||
if (compareAndSet(false, true)) {
|
||||
Continuation<R> continuation = this.continuation;
|
||||
Result.Companion companion = Result.INSTANCE;
|
||||
continuation.resumeWith(Result.m288constructorimpl(ResultKt.createFailure(error)));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // java.util.concurrent.atomic.AtomicBoolean
|
||||
public String toString() {
|
||||
return "ContinuationOutcomeReceiver(outcomeReceived = " + get() + ')';
|
||||
}
|
||||
}
|
35
02-Easy5/E5/sources/androidx/core/os/EnvironmentCompat.java
Normal file
35
02-Easy5/E5/sources/androidx/core/os/EnvironmentCompat.java
Normal file
@ -0,0 +1,35 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Environment;
|
||||
import java.io.File;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class EnvironmentCompat {
|
||||
public static final String MEDIA_UNKNOWN = "unknown";
|
||||
private static final String TAG = "EnvironmentCompat";
|
||||
|
||||
public static String getStorageState(File file) {
|
||||
return Api21Impl.getExternalStorageState(file);
|
||||
}
|
||||
|
||||
private EnvironmentCompat() {
|
||||
}
|
||||
|
||||
static class Api21Impl {
|
||||
private Api21Impl() {
|
||||
}
|
||||
|
||||
static String getExternalStorageState(File file) {
|
||||
return Environment.getExternalStorageState(file);
|
||||
}
|
||||
}
|
||||
|
||||
static class Api19Impl {
|
||||
private Api19Impl() {
|
||||
}
|
||||
|
||||
static String getStorageState(File file) {
|
||||
return Environment.getStorageState(file);
|
||||
}
|
||||
}
|
||||
}
|
32
02-Easy5/E5/sources/androidx/core/os/ExecutorCompat.java
Normal file
32
02-Easy5/E5/sources/androidx/core/os/ExecutorCompat.java
Normal file
@ -0,0 +1,32 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Handler;
|
||||
import androidx.core.util.Preconditions;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ExecutorCompat {
|
||||
public static Executor create(Handler handler) {
|
||||
return new HandlerExecutor(handler);
|
||||
}
|
||||
|
||||
private ExecutorCompat() {
|
||||
}
|
||||
|
||||
private static class HandlerExecutor implements Executor {
|
||||
private final Handler mHandler;
|
||||
|
||||
HandlerExecutor(Handler handler) {
|
||||
this.mHandler = (Handler) Preconditions.checkNotNull(handler);
|
||||
}
|
||||
|
||||
@Override // java.util.concurrent.Executor
|
||||
public void execute(Runnable runnable) {
|
||||
if (this.mHandler.post((Runnable) Preconditions.checkNotNull(runnable))) {
|
||||
return;
|
||||
}
|
||||
throw new RejectedExecutionException(this.mHandler + " is shutting down");
|
||||
}
|
||||
}
|
||||
}
|
138
02-Easy5/E5/sources/androidx/core/os/HandlerCompat.java
Normal file
138
02-Easy5/E5/sources/androidx/core/os/HandlerCompat.java
Normal file
@ -0,0 +1,138 @@
|
||||
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 java.lang.reflect.InvocationTargetException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class HandlerCompat {
|
||||
private static final String TAG = "HandlerCompat";
|
||||
|
||||
public static Handler createAsync(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, 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);
|
||||
}
|
||||
}
|
||||
|
||||
public static Handler createAsync(Looper looper, 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, 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(Handler handler, Runnable runnable, 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(Handler handler, 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() {
|
||||
}
|
||||
|
||||
private static class Api29Impl {
|
||||
private Api29Impl() {
|
||||
}
|
||||
|
||||
public static boolean hasCallbacks(Handler handler, Runnable runnable) {
|
||||
return handler.hasCallbacks(runnable);
|
||||
}
|
||||
}
|
||||
|
||||
private 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);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
|
||||
/* compiled from: Handler.kt */
|
||||
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "run"}, k = 3, mv = {1, 7, 1}, xi = 176)
|
||||
/* loaded from: classes.dex */
|
||||
public final class HandlerKt$postAtTime$runnable$1 implements Runnable {
|
||||
final /* synthetic */ Function0<Unit> $action;
|
||||
|
||||
public HandlerKt$postAtTime$runnable$1(Function0<Unit> function0) {
|
||||
this.$action = function0;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.$action.invoke();
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
|
||||
/* compiled from: Handler.kt */
|
||||
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "run"}, k = 3, mv = {1, 7, 1}, xi = 176)
|
||||
/* loaded from: classes.dex */
|
||||
public final class HandlerKt$postDelayed$runnable$1 implements Runnable {
|
||||
final /* synthetic */ Function0<Unit> $action;
|
||||
|
||||
public HandlerKt$postDelayed$runnable$1(Function0<Unit> function0) {
|
||||
this.$action = function0;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.$action.invoke();
|
||||
}
|
||||
}
|
58
02-Easy5/E5/sources/androidx/core/os/HandlerKt.java
Normal file
58
02-Easy5/E5/sources/androidx/core/os/HandlerKt.java
Normal file
@ -0,0 +1,58 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Handler;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: Handler.kt */
|
||||
@Metadata(d1 = {"\u0000$\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\u001a4\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00042\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u000e\b\u0004\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\t0\bH\u0086\bø\u0001\u0000\u001a4\u0010\n\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u000b\u001a\u00020\u00042\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u000e\b\u0004\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\t0\bH\u0086\bø\u0001\u0000\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006\f"}, d2 = {"postAtTime", "Ljava/lang/Runnable;", "Landroid/os/Handler;", "uptimeMillis", "", "token", "", "action", "Lkotlin/Function0;", "", "postDelayed", "delayInMillis", "core-ktx_release"}, k = 2, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class HandlerKt {
|
||||
public static /* synthetic */ Runnable postDelayed$default(Handler handler, long j, Object obj, Function0 action, int i, Object obj2) {
|
||||
if ((i & 2) != 0) {
|
||||
obj = null;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(handler, "<this>");
|
||||
Intrinsics.checkNotNullParameter(action, "action");
|
||||
HandlerKt$postDelayed$runnable$1 handlerKt$postDelayed$runnable$1 = new HandlerKt$postDelayed$runnable$1(action);
|
||||
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 postDelayed(Handler handler, long j, Object obj, Function0<Unit> action) {
|
||||
Intrinsics.checkNotNullParameter(handler, "<this>");
|
||||
Intrinsics.checkNotNullParameter(action, "action");
|
||||
HandlerKt$postDelayed$runnable$1 handlerKt$postDelayed$runnable$1 = new HandlerKt$postDelayed$runnable$1(action);
|
||||
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 postAtTime$default(Handler handler, long j, Object obj, Function0 action, int i, Object obj2) {
|
||||
if ((i & 2) != 0) {
|
||||
obj = null;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(handler, "<this>");
|
||||
Intrinsics.checkNotNullParameter(action, "action");
|
||||
HandlerKt$postAtTime$runnable$1 handlerKt$postAtTime$runnable$1 = new HandlerKt$postAtTime$runnable$1(action);
|
||||
handler.postAtTime(handlerKt$postAtTime$runnable$1, obj, j);
|
||||
return handlerKt$postAtTime$runnable$1;
|
||||
}
|
||||
|
||||
public static final Runnable postAtTime(Handler handler, long j, Object obj, Function0<Unit> action) {
|
||||
Intrinsics.checkNotNullParameter(handler, "<this>");
|
||||
Intrinsics.checkNotNullParameter(action, "action");
|
||||
HandlerKt$postAtTime$runnable$1 handlerKt$postAtTime$runnable$1 = new HandlerKt$postAtTime$runnable$1(action);
|
||||
handler.postAtTime(handlerKt$postAtTime$runnable$1, obj, j);
|
||||
return handlerKt$postAtTime$runnable$1;
|
||||
}
|
||||
}
|
188
02-Easy5/E5/sources/androidx/core/os/LocaleListCompat.java
Normal file
188
02-Easy5/E5/sources/androidx/core/os/LocaleListCompat.java
Normal file
@ -0,0 +1,188 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.LocaleList;
|
||||
import androidx.core.graphics.ColorKt$$ExternalSyntheticApiModelOutline0;
|
||||
import androidx.core.text.ICUCompat;
|
||||
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;
|
||||
|
||||
public static LocaleListCompat getEmptyLocaleList() {
|
||||
return sEmptyLocaleList;
|
||||
}
|
||||
|
||||
private LocaleListCompat(LocaleListInterface localeListInterface) {
|
||||
this.mImpl = localeListInterface;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static LocaleListCompat wrap(Object obj) {
|
||||
return wrap(ColorKt$$ExternalSyntheticApiModelOutline0.m91m(obj));
|
||||
}
|
||||
|
||||
public static LocaleListCompat wrap(LocaleList localeList) {
|
||||
return new LocaleListCompat(new LocaleListPlatformWrapper(localeList));
|
||||
}
|
||||
|
||||
public Object unwrap() {
|
||||
return this.mImpl.getLocaleList();
|
||||
}
|
||||
|
||||
public static LocaleListCompat create(Locale... localeArr) {
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
return wrap(Api24Impl.createLocaleList(localeArr));
|
||||
}
|
||||
return new LocaleListCompat(new LocaleListCompatWrapper(localeArr));
|
||||
}
|
||||
|
||||
public Locale get(int i) {
|
||||
return this.mImpl.get(i);
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return this.mImpl.isEmpty();
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return this.mImpl.size();
|
||||
}
|
||||
|
||||
public int indexOf(Locale locale) {
|
||||
return this.mImpl.indexOf(locale);
|
||||
}
|
||||
|
||||
public String toLanguageTags() {
|
||||
return this.mImpl.toLanguageTags();
|
||||
}
|
||||
|
||||
public Locale getFirstMatch(String[] strArr) {
|
||||
return this.mImpl.getFirstMatch(strArr);
|
||||
}
|
||||
|
||||
public static LocaleListCompat forLanguageTags(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);
|
||||
}
|
||||
|
||||
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 + "]");
|
||||
}
|
||||
|
||||
public static LocaleListCompat getAdjustedDefault() {
|
||||
return Build.VERSION.SDK_INT >= 24 ? wrap(Api24Impl.getAdjustedDefault()) : create(Locale.getDefault());
|
||||
}
|
||||
|
||||
public static LocaleListCompat getDefault() {
|
||||
return Build.VERSION.SDK_INT >= 24 ? wrap(Api24Impl.getDefault()) : create(Locale.getDefault());
|
||||
}
|
||||
|
||||
public static boolean matchesLanguageAndScript(Locale locale, Locale locale2) {
|
||||
boolean matchesLanguageAndScript;
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
matchesLanguageAndScript = LocaleList.matchesLanguageAndScript(locale, locale2);
|
||||
return matchesLanguageAndScript;
|
||||
}
|
||||
return Api21Impl.matchesLanguageAndScript(locale, locale2);
|
||||
}
|
||||
|
||||
static class Api21Impl {
|
||||
private static final Locale[] PSEUDO_LOCALE = {new Locale("en", "XA"), new Locale("ar", "XB")};
|
||||
|
||||
private Api21Impl() {
|
||||
}
|
||||
|
||||
static boolean matchesLanguageAndScript(Locale locale, 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;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.mImpl.toString();
|
||||
}
|
||||
|
||||
static class Api24Impl {
|
||||
private Api24Impl() {
|
||||
}
|
||||
|
||||
static LocaleList createLocaleList(Locale... localeArr) {
|
||||
return new LocaleList(localeArr);
|
||||
}
|
||||
|
||||
static LocaleList getAdjustedDefault() {
|
||||
return LocaleList.getAdjustedDefault();
|
||||
}
|
||||
|
||||
static LocaleList getDefault() {
|
||||
return LocaleList.getDefault();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,269 @@
|
||||
package androidx.core.os;
|
||||
|
||||
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;
|
||||
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
|
||||
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;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("[");
|
||||
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("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LocaleListCompatWrapper(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();
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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 L21
|
||||
L1e:
|
||||
r6 = 2147483647(0x7fffffff, float:NaN)
|
||||
L21:
|
||||
java.util.Iterator r5 = r5.iterator()
|
||||
L25:
|
||||
boolean r1 = r5.hasNext()
|
||||
if (r1 == 0) goto L40
|
||||
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 L3c
|
||||
return r3
|
||||
L3c:
|
||||
if (r1 >= r6) goto L25
|
||||
r6 = r1
|
||||
goto L25
|
||||
L40:
|
||||
if (r6 != r0) goto L43
|
||||
return r3
|
||||
L43:
|
||||
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(String[] strArr) {
|
||||
return computeFirstMatch(Arrays.asList(strArr), false);
|
||||
}
|
||||
|
||||
static class Api21Impl {
|
||||
private Api21Impl() {
|
||||
}
|
||||
|
||||
static String getScript(Locale locale) {
|
||||
return locale.getScript();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
interface LocaleListInterface {
|
||||
Locale get(int i);
|
||||
|
||||
Locale getFirstMatch(String[] strArr);
|
||||
|
||||
Object getLocaleList();
|
||||
|
||||
int indexOf(Locale locale);
|
||||
|
||||
boolean isEmpty();
|
||||
|
||||
int size();
|
||||
|
||||
String toLanguageTags();
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.LocaleList;
|
||||
import androidx.core.graphics.ColorKt$$ExternalSyntheticApiModelOutline0;
|
||||
import java.util.Locale;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class LocaleListPlatformWrapper implements LocaleListInterface {
|
||||
private final LocaleList mLocaleList;
|
||||
|
||||
@Override // androidx.core.os.LocaleListInterface
|
||||
public Object getLocaleList() {
|
||||
return this.mLocaleList;
|
||||
}
|
||||
|
||||
LocaleListPlatformWrapper(Object obj) {
|
||||
this.mLocaleList = ColorKt$$ExternalSyntheticApiModelOutline0.m91m(obj);
|
||||
}
|
||||
|
||||
@Override // androidx.core.os.LocaleListInterface
|
||||
public Locale get(int i) {
|
||||
Locale locale;
|
||||
locale = this.mLocaleList.get(i);
|
||||
return locale;
|
||||
}
|
||||
|
||||
@Override // androidx.core.os.LocaleListInterface
|
||||
public boolean isEmpty() {
|
||||
boolean isEmpty;
|
||||
isEmpty = this.mLocaleList.isEmpty();
|
||||
return isEmpty;
|
||||
}
|
||||
|
||||
@Override // androidx.core.os.LocaleListInterface
|
||||
public int size() {
|
||||
int size;
|
||||
size = this.mLocaleList.size();
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override // androidx.core.os.LocaleListInterface
|
||||
public int indexOf(Locale locale) {
|
||||
int indexOf;
|
||||
indexOf = this.mLocaleList.indexOf(locale);
|
||||
return indexOf;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
boolean equals;
|
||||
equals = this.mLocaleList.equals(((LocaleListInterface) obj).getLocaleList());
|
||||
return equals;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int hashCode;
|
||||
hashCode = this.mLocaleList.hashCode();
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String localeList;
|
||||
localeList = this.mLocaleList.toString();
|
||||
return localeList;
|
||||
}
|
||||
|
||||
@Override // androidx.core.os.LocaleListInterface
|
||||
public String toLanguageTags() {
|
||||
String languageTags;
|
||||
languageTags = this.mLocaleList.toLanguageTags();
|
||||
return languageTags;
|
||||
}
|
||||
|
||||
@Override // androidx.core.os.LocaleListInterface
|
||||
public Locale getFirstMatch(String[] strArr) {
|
||||
Locale firstMatch;
|
||||
firstMatch = this.mLocaleList.getFirstMatch(strArr);
|
||||
return firstMatch;
|
||||
}
|
||||
}
|
52
02-Easy5/E5/sources/androidx/core/os/MessageCompat.java
Normal file
52
02-Easy5/E5/sources/androidx/core/os/MessageCompat.java
Normal file
@ -0,0 +1,52 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Message;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class MessageCompat {
|
||||
private static boolean sTryIsAsynchronous = true;
|
||||
private static boolean sTrySetAsynchronous = true;
|
||||
|
||||
public static void setAsynchronous(Message message, boolean z) {
|
||||
if (Build.VERSION.SDK_INT >= 22) {
|
||||
Api22Impl.setAsynchronous(message, z);
|
||||
} else if (sTrySetAsynchronous) {
|
||||
try {
|
||||
Api22Impl.setAsynchronous(message, z);
|
||||
} catch (NoSuchMethodError unused) {
|
||||
sTrySetAsynchronous = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isAsynchronous(Message message) {
|
||||
if (Build.VERSION.SDK_INT >= 22) {
|
||||
return Api22Impl.isAsynchronous(message);
|
||||
}
|
||||
if (sTryIsAsynchronous) {
|
||||
try {
|
||||
return Api22Impl.isAsynchronous(message);
|
||||
} catch (NoSuchMethodError unused) {
|
||||
sTryIsAsynchronous = false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private MessageCompat() {
|
||||
}
|
||||
|
||||
static class Api22Impl {
|
||||
private Api22Impl() {
|
||||
}
|
||||
|
||||
static boolean isAsynchronous(Message message) {
|
||||
return message.isAsynchronous();
|
||||
}
|
||||
|
||||
static void setAsynchronous(Message message, boolean z) {
|
||||
message.setAsynchronous(z);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import androidx.core.util.ObjectsCompat;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class OperationCanceledException extends RuntimeException {
|
||||
public OperationCanceledException() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public OperationCanceledException(String str) {
|
||||
super(ObjectsCompat.toString(str, "The operation has been canceled."));
|
||||
}
|
||||
}
|
17
02-Easy5/E5/sources/androidx/core/os/OutcomeReceiverKt.java
Normal file
17
02-Easy5/E5/sources/androidx/core/os/OutcomeReceiverKt.java
Normal file
@ -0,0 +1,17 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.OutcomeReceiver;
|
||||
import androidx.core.graphics.ColorKt$$ExternalSyntheticApiModelOutline0;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: OutcomeReceiver.kt */
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0003\n\u0002\u0018\u0002\n\u0000\u001a.\u0010\u0000\u001a\u000e\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u00030\u0001\"\u0004\b\u0000\u0010\u0002\"\b\b\u0001\u0010\u0003*\u00020\u0004*\b\u0012\u0004\u0012\u0002H\u00020\u0005H\u0007¨\u0006\u0006"}, d2 = {"asOutcomeReceiver", "Landroid/os/OutcomeReceiver;", "R", "E", "", "Lkotlin/coroutines/Continuation;", "core-ktx_release"}, k = 2, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class OutcomeReceiverKt {
|
||||
public static final <R, E extends Throwable> OutcomeReceiver<R, E> asOutcomeReceiver(Continuation<? super R> continuation) {
|
||||
Intrinsics.checkNotNullParameter(continuation, "<this>");
|
||||
return ColorKt$$ExternalSyntheticApiModelOutline0.m92m((Object) new ContinuationOutcomeReceiver(continuation));
|
||||
}
|
||||
}
|
189
02-Easy5/E5/sources/androidx/core/os/ParcelCompat.java
Normal file
189
02-Easy5/E5/sources/androidx/core/os/ParcelCompat.java
Normal file
@ -0,0 +1,189 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.SparseArray;
|
||||
import java.io.Serializable;
|
||||
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(Parcel parcel) {
|
||||
return parcel.readInt() != 0;
|
||||
}
|
||||
|
||||
public static void writeBoolean(Parcel parcel, boolean z) {
|
||||
parcel.writeInt(z ? 1 : 0);
|
||||
}
|
||||
|
||||
public static <T> void readList(Parcel parcel, List<? super T> list, ClassLoader classLoader, Class<T> cls) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
TiramisuImpl.readList(parcel, list, classLoader, cls);
|
||||
} else {
|
||||
parcel.readList(list, classLoader);
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> ArrayList<T> readArrayList(Parcel parcel, ClassLoader classLoader, Class<? extends T> cls) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
return TiramisuImpl.readArrayList(parcel, classLoader, cls);
|
||||
}
|
||||
return parcel.readArrayList(classLoader);
|
||||
}
|
||||
|
||||
public static <T> T[] readArray(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
return (T[]) TiramisuImpl.readArray(parcel, classLoader, cls);
|
||||
}
|
||||
return (T[]) parcel.readArray(classLoader);
|
||||
}
|
||||
|
||||
public static <T> SparseArray<T> readSparseArray(Parcel parcel, ClassLoader classLoader, Class<? extends T> cls) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
return TiramisuImpl.readSparseArray(parcel, classLoader, cls);
|
||||
}
|
||||
return parcel.readSparseArray(classLoader);
|
||||
}
|
||||
|
||||
public static <K, V> void readMap(Parcel parcel, Map<? super K, ? super V> map, ClassLoader classLoader, Class<K> cls, Class<V> cls2) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
TiramisuImpl.readMap(parcel, map, classLoader, cls, cls2);
|
||||
} else {
|
||||
parcel.readMap(map, classLoader);
|
||||
}
|
||||
}
|
||||
|
||||
public static <K, V> HashMap<K, V> readHashMap(Parcel parcel, ClassLoader classLoader, Class<? extends K> cls, Class<? extends V> cls2) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
return TiramisuImpl.readHashMap(parcel, classLoader, cls, cls2);
|
||||
}
|
||||
return parcel.readHashMap(classLoader);
|
||||
}
|
||||
|
||||
public static <T extends Parcelable> T readParcelable(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
return (T) TiramisuImpl.readParcelable(parcel, classLoader, cls);
|
||||
}
|
||||
return (T) parcel.readParcelable(classLoader);
|
||||
}
|
||||
|
||||
public static <T> Parcelable.Creator<T> readParcelableCreator(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
return TiramisuImpl.readParcelableCreator(parcel, classLoader, cls);
|
||||
}
|
||||
return (Parcelable.Creator<T>) Api30Impl.readParcelableCreator(parcel, classLoader);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public static <T> T[] readParcelableArray(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
return (T[]) TiramisuImpl.readParcelableArray(parcel, classLoader, cls);
|
||||
}
|
||||
return (T[]) parcel.readParcelableArray(classLoader);
|
||||
}
|
||||
|
||||
public static <T> List<T> readParcelableList(Parcel parcel, List<T> list, ClassLoader classLoader, Class<T> cls) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
return TiramisuImpl.readParcelableList(parcel, list, classLoader, cls);
|
||||
}
|
||||
return Api29Impl.readParcelableList(parcel, list, classLoader);
|
||||
}
|
||||
|
||||
public static <T extends Serializable> T readSerializable(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
|
||||
if (BuildCompat.isAtLeastT()) {
|
||||
return (T) TiramisuImpl.readSerializable(parcel, classLoader, cls);
|
||||
}
|
||||
return (T) parcel.readSerializable();
|
||||
}
|
||||
|
||||
private ParcelCompat() {
|
||||
}
|
||||
|
||||
static class Api29Impl {
|
||||
private Api29Impl() {
|
||||
}
|
||||
|
||||
static final <T extends Parcelable> List<T> readParcelableList(Parcel parcel, List<T> list, ClassLoader classLoader) {
|
||||
return parcel.readParcelableList(list, classLoader);
|
||||
}
|
||||
}
|
||||
|
||||
static class Api30Impl {
|
||||
private Api30Impl() {
|
||||
}
|
||||
|
||||
static final Parcelable.Creator<?> readParcelableCreator(Parcel parcel, ClassLoader classLoader) {
|
||||
return parcel.readParcelableCreator(classLoader);
|
||||
}
|
||||
}
|
||||
|
||||
static class TiramisuImpl {
|
||||
private TiramisuImpl() {
|
||||
}
|
||||
|
||||
static <T extends Serializable> T readSerializable(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
|
||||
Object readSerializable;
|
||||
readSerializable = parcel.readSerializable(classLoader, cls);
|
||||
return (T) readSerializable;
|
||||
}
|
||||
|
||||
static <T extends Parcelable> T readParcelable(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
|
||||
Object readParcelable;
|
||||
readParcelable = parcel.readParcelable(classLoader, cls);
|
||||
return (T) readParcelable;
|
||||
}
|
||||
|
||||
public static <T> Parcelable.Creator<T> readParcelableCreator(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
|
||||
Parcelable.Creator<T> readParcelableCreator;
|
||||
readParcelableCreator = parcel.readParcelableCreator(classLoader, cls);
|
||||
return readParcelableCreator;
|
||||
}
|
||||
|
||||
static <T> T[] readParcelableArray(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
|
||||
Object[] readParcelableArray;
|
||||
readParcelableArray = parcel.readParcelableArray(classLoader, cls);
|
||||
return (T[]) readParcelableArray;
|
||||
}
|
||||
|
||||
static <T> List<T> readParcelableList(Parcel parcel, List<T> list, ClassLoader classLoader, Class<T> cls) {
|
||||
List<T> readParcelableList;
|
||||
readParcelableList = parcel.readParcelableList(list, classLoader, cls);
|
||||
return readParcelableList;
|
||||
}
|
||||
|
||||
public static <T> void readList(Parcel parcel, List<? super T> list, ClassLoader classLoader, Class<T> cls) {
|
||||
parcel.readList(list, classLoader, cls);
|
||||
}
|
||||
|
||||
public static <T> ArrayList<T> readArrayList(Parcel parcel, ClassLoader classLoader, Class<? extends T> cls) {
|
||||
ArrayList<T> readArrayList;
|
||||
readArrayList = parcel.readArrayList(classLoader, cls);
|
||||
return readArrayList;
|
||||
}
|
||||
|
||||
public static <T> T[] readArray(Parcel parcel, ClassLoader classLoader, Class<T> cls) {
|
||||
Object[] readArray;
|
||||
readArray = parcel.readArray(classLoader, cls);
|
||||
return (T[]) readArray;
|
||||
}
|
||||
|
||||
public static <T> SparseArray<T> readSparseArray(Parcel parcel, ClassLoader classLoader, Class<? extends T> cls) {
|
||||
SparseArray<T> readSparseArray;
|
||||
readSparseArray = parcel.readSparseArray(classLoader, cls);
|
||||
return readSparseArray;
|
||||
}
|
||||
|
||||
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) {
|
||||
HashMap<K, V> readHashMap;
|
||||
readHashMap = parcel.readHashMap(classLoader, cls, cls2);
|
||||
return readHashMap;
|
||||
}
|
||||
}
|
||||
}
|
39
02-Easy5/E5/sources/androidx/core/os/ParcelableCompat.java
Normal file
39
02-Easy5/E5/sources/androidx/core/os/ParcelableCompat.java
Normal 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);
|
||||
}
|
||||
|
||||
static class ParcelableCompatCreatorHoneycombMR2<T> implements Parcelable.ClassLoaderCreator<T> {
|
||||
private final ParcelableCompatCreatorCallbacks<T> mCallbacks;
|
||||
|
||||
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() {
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.PersistableBundle;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.JvmStatic;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.text.Typography;
|
||||
|
||||
/* compiled from: PersistableBundle.kt */
|
||||
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\bÃ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0007J$\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\u00042\b\u0010\n\u001a\u0004\u0018\u00010\u000b2\b\u0010\f\u001a\u0004\u0018\u00010\u0001H\u0007¨\u0006\r"}, d2 = {"Landroidx/core/os/PersistableBundleApi21ImplKt;", "", "()V", "createPersistableBundle", "Landroid/os/PersistableBundle;", "capacity", "", "putValue", "", "persistableBundle", "key", "", "value", "core-ktx_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class PersistableBundleApi21ImplKt {
|
||||
public static final PersistableBundleApi21ImplKt INSTANCE = new PersistableBundleApi21ImplKt();
|
||||
|
||||
private PersistableBundleApi21ImplKt() {
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final PersistableBundle createPersistableBundle(int capacity) {
|
||||
return new PersistableBundle(capacity);
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final void putValue(PersistableBundle persistableBundle, String key, Object value) {
|
||||
Intrinsics.checkNotNullParameter(persistableBundle, "persistableBundle");
|
||||
if (value == null) {
|
||||
persistableBundle.putString(key, null);
|
||||
return;
|
||||
}
|
||||
if (value instanceof Boolean) {
|
||||
if (Build.VERSION.SDK_INT >= 22) {
|
||||
PersistableBundleApi22ImplKt.putBoolean(persistableBundle, key, ((Boolean) value).booleanValue());
|
||||
return;
|
||||
}
|
||||
throw new IllegalArgumentException("Illegal value type boolean for key \"" + key + Typography.quote);
|
||||
}
|
||||
if (value instanceof Double) {
|
||||
persistableBundle.putDouble(key, ((Number) value).doubleValue());
|
||||
return;
|
||||
}
|
||||
if (value instanceof Integer) {
|
||||
persistableBundle.putInt(key, ((Number) value).intValue());
|
||||
return;
|
||||
}
|
||||
if (value instanceof Long) {
|
||||
persistableBundle.putLong(key, ((Number) value).longValue());
|
||||
return;
|
||||
}
|
||||
if (value instanceof String) {
|
||||
persistableBundle.putString(key, (String) value);
|
||||
return;
|
||||
}
|
||||
if (value instanceof boolean[]) {
|
||||
if (Build.VERSION.SDK_INT >= 22) {
|
||||
PersistableBundleApi22ImplKt.putBooleanArray(persistableBundle, key, (boolean[]) value);
|
||||
return;
|
||||
}
|
||||
throw new IllegalArgumentException("Illegal value type boolean[] for key \"" + key + Typography.quote);
|
||||
}
|
||||
if (value instanceof double[]) {
|
||||
persistableBundle.putDoubleArray(key, (double[]) value);
|
||||
return;
|
||||
}
|
||||
if (value instanceof int[]) {
|
||||
persistableBundle.putIntArray(key, (int[]) value);
|
||||
return;
|
||||
}
|
||||
if (value instanceof long[]) {
|
||||
persistableBundle.putLongArray(key, (long[]) value);
|
||||
return;
|
||||
}
|
||||
if (value instanceof Object[]) {
|
||||
Class<?> componentType = value.getClass().getComponentType();
|
||||
Intrinsics.checkNotNull(componentType);
|
||||
if (String.class.isAssignableFrom(componentType)) {
|
||||
Intrinsics.checkNotNull(value, "null cannot be cast to non-null type kotlin.Array<kotlin.String>");
|
||||
persistableBundle.putStringArray(key, (String[]) value);
|
||||
return;
|
||||
}
|
||||
throw new IllegalArgumentException("Illegal value array type " + componentType.getCanonicalName() + " for key \"" + key + Typography.quote);
|
||||
}
|
||||
throw new IllegalArgumentException("Illegal value type " + value.getClass().getCanonicalName() + " for key \"" + key + Typography.quote);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.PersistableBundle;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.JvmStatic;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: PersistableBundle.kt */
|
||||
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0018\n\u0000\bÃ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\"\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\b2\u0006\u0010\t\u001a\u00020\nH\u0007J\"\u0010\u000b\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\b2\u0006\u0010\t\u001a\u00020\fH\u0007¨\u0006\r"}, d2 = {"Landroidx/core/os/PersistableBundleApi22ImplKt;", "", "()V", "putBoolean", "", "persistableBundle", "Landroid/os/PersistableBundle;", "key", "", "value", "", "putBooleanArray", "", "core-ktx_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class PersistableBundleApi22ImplKt {
|
||||
public static final PersistableBundleApi22ImplKt INSTANCE = new PersistableBundleApi22ImplKt();
|
||||
|
||||
private PersistableBundleApi22ImplKt() {
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final void putBoolean(PersistableBundle persistableBundle, String key, boolean value) {
|
||||
Intrinsics.checkNotNullParameter(persistableBundle, "persistableBundle");
|
||||
persistableBundle.putBoolean(key, value);
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final void putBooleanArray(PersistableBundle persistableBundle, String key, boolean[] value) {
|
||||
Intrinsics.checkNotNullParameter(persistableBundle, "persistableBundle");
|
||||
Intrinsics.checkNotNullParameter(value, "value");
|
||||
persistableBundle.putBooleanArray(key, value);
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.PersistableBundle;
|
||||
import java.util.Map;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Pair;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: PersistableBundle.kt */
|
||||
@Metadata(d1 = {"\u0000\"\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010$\n\u0000\u001a\b\u0010\u0000\u001a\u00020\u0001H\u0007\u001a=\u0010\u0000\u001a\u00020\u00012.\u0010\u0002\u001a\u0018\u0012\u0014\b\u0001\u0012\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0006\u0012\u0004\u0018\u00010\u00060\u00040\u0003\"\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0006\u0012\u0004\u0018\u00010\u00060\u0004H\u0007¢\u0006\u0002\u0010\u0007\u001a\u001a\u0010\b\u001a\u00020\u0001*\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0006\u0012\u0004\u0018\u00010\u00060\tH\u0007¨\u0006\n"}, d2 = {"persistableBundleOf", "Landroid/os/PersistableBundle;", "pairs", "", "Lkotlin/Pair;", "", "", "([Lkotlin/Pair;)Landroid/os/PersistableBundle;", "toPersistableBundle", "", "core-ktx_release"}, k = 2, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class PersistableBundleKt {
|
||||
public static final PersistableBundle persistableBundleOf(Pair<String, ? extends Object>... pairs) {
|
||||
Intrinsics.checkNotNullParameter(pairs, "pairs");
|
||||
PersistableBundle createPersistableBundle = PersistableBundleApi21ImplKt.createPersistableBundle(pairs.length);
|
||||
for (Pair<String, ? extends Object> pair : pairs) {
|
||||
PersistableBundleApi21ImplKt.putValue(createPersistableBundle, pair.component1(), pair.component2());
|
||||
}
|
||||
return createPersistableBundle;
|
||||
}
|
||||
|
||||
public static final PersistableBundle persistableBundleOf() {
|
||||
return PersistableBundleApi21ImplKt.createPersistableBundle(0);
|
||||
}
|
||||
|
||||
public static final PersistableBundle toPersistableBundle(Map<String, ? extends Object> map) {
|
||||
Intrinsics.checkNotNullParameter(map, "<this>");
|
||||
PersistableBundle createPersistableBundle = PersistableBundleApi21ImplKt.createPersistableBundle(map.size());
|
||||
for (Map.Entry<String, ? extends Object> entry : map.entrySet()) {
|
||||
PersistableBundleApi21ImplKt.putValue(createPersistableBundle, entry.getKey(), entry.getValue());
|
||||
}
|
||||
return createPersistableBundle;
|
||||
}
|
||||
}
|
90
02-Easy5/E5/sources/androidx/core/os/ProcessCompat.java
Normal file
90
02-Easy5/E5/sources/androidx/core/os/ProcessCompat.java
Normal file
@ -0,0 +1,90 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Process;
|
||||
import android.os.UserHandle;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ProcessCompat {
|
||||
private ProcessCompat() {
|
||||
}
|
||||
|
||||
public static boolean isApplicationUid(int i) {
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
return Api24Impl.isApplicationUid(i);
|
||||
}
|
||||
return Api17Impl.isApplicationUid(i);
|
||||
}
|
||||
|
||||
static class Api24Impl {
|
||||
private Api24Impl() {
|
||||
}
|
||||
|
||||
static boolean isApplicationUid(int i) {
|
||||
return Process.isApplicationUid(i);
|
||||
}
|
||||
}
|
||||
|
||||
static class Api17Impl {
|
||||
private static Method sMethodUserHandleIsAppMethod;
|
||||
private static boolean sResolved;
|
||||
private static final Object sResolvedLock = new Object();
|
||||
|
||||
private Api17Impl() {
|
||||
}
|
||||
|
||||
static boolean isApplicationUid(int i) {
|
||||
try {
|
||||
synchronized (sResolvedLock) {
|
||||
if (!sResolved) {
|
||||
sResolved = true;
|
||||
sMethodUserHandleIsAppMethod = UserHandle.class.getDeclaredMethod("isApp", Integer.TYPE);
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
static class Api16Impl {
|
||||
private static Method sMethodUserIdIsAppMethod;
|
||||
private static boolean sResolved;
|
||||
private static final Object sResolvedLock = new Object();
|
||||
|
||||
private Api16Impl() {
|
||||
}
|
||||
|
||||
static boolean isApplicationUid(int i) {
|
||||
try {
|
||||
synchronized (sResolvedLock) {
|
||||
if (!sResolved) {
|
||||
sResolved = true;
|
||||
sMethodUserIdIsAppMethod = Class.forName("android.os.UserId").getDeclaredMethod("isApp", Integer.TYPE);
|
||||
}
|
||||
}
|
||||
Method method = sMethodUserIdIsAppMethod;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
124
02-Easy5/E5/sources/androidx/core/os/TraceCompat.java
Normal file
124
02-Easy5/E5/sources/androidx/core/os/TraceCompat.java
Normal file
@ -0,0 +1,124 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Trace;
|
||||
import android.util.Log;
|
||||
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);
|
||||
sIsTagEnabledMethod = Trace.class.getMethod("isTagEnabled", Long.TYPE);
|
||||
sAsyncTraceBeginMethod = Trace.class.getMethod("asyncTraceBegin", Long.TYPE, String.class, Integer.TYPE);
|
||||
sAsyncTraceEndMethod = Trace.class.getMethod("asyncTraceEnd", Long.TYPE, String.class, Integer.TYPE);
|
||||
sTraceCounterMethod = Trace.class.getMethod("traceCounter", Long.TYPE, String.class, Integer.TYPE);
|
||||
} catch (Exception e) {
|
||||
Log.i(TAG, "Unable to initialize via reflection.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
Log.v(TAG, "Unable to invoke isTagEnabled() via reflection.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void beginSection(String str) {
|
||||
Api18Impl.beginSection(str);
|
||||
}
|
||||
|
||||
public static void endSection() {
|
||||
Api18Impl.endSection();
|
||||
}
|
||||
|
||||
public static void beginAsyncSection(String str, int i) {
|
||||
if (Build.VERSION.SDK_INT >= 29) {
|
||||
Api29Impl.beginAsyncSection(str, i);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
sAsyncTraceBeginMethod.invoke(null, Long.valueOf(sTraceTagApp), str, Integer.valueOf(i));
|
||||
} catch (Exception unused) {
|
||||
Log.v(TAG, "Unable to invoke asyncTraceBegin() via reflection.");
|
||||
}
|
||||
}
|
||||
|
||||
public static void endAsyncSection(String str, int i) {
|
||||
if (Build.VERSION.SDK_INT >= 29) {
|
||||
Api29Impl.endAsyncSection(str, i);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
sAsyncTraceEndMethod.invoke(null, Long.valueOf(sTraceTagApp), str, Integer.valueOf(i));
|
||||
} catch (Exception unused) {
|
||||
Log.v(TAG, "Unable to invoke endAsyncSection() via reflection.");
|
||||
}
|
||||
}
|
||||
|
||||
public static void setCounter(String str, int i) {
|
||||
if (Build.VERSION.SDK_INT >= 29) {
|
||||
Api29Impl.setCounter(str, i);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
sTraceCounterMethod.invoke(null, Long.valueOf(sTraceTagApp), str, Integer.valueOf(i));
|
||||
} catch (Exception unused) {
|
||||
Log.v(TAG, "Unable to invoke traceCounter() via reflection.");
|
||||
}
|
||||
}
|
||||
|
||||
private TraceCompat() {
|
||||
}
|
||||
|
||||
static class Api29Impl {
|
||||
private Api29Impl() {
|
||||
}
|
||||
|
||||
static boolean isEnabled() {
|
||||
return Trace.isEnabled();
|
||||
}
|
||||
|
||||
static void endAsyncSection(String str, int i) {
|
||||
Trace.endAsyncSection(str, i);
|
||||
}
|
||||
|
||||
static void beginAsyncSection(String str, int i) {
|
||||
Trace.beginAsyncSection(str, i);
|
||||
}
|
||||
|
||||
static void setCounter(String str, long j) {
|
||||
Trace.setCounter(str, j);
|
||||
}
|
||||
}
|
||||
|
||||
static class Api18Impl {
|
||||
private Api18Impl() {
|
||||
}
|
||||
|
||||
static void beginSection(String str) {
|
||||
Trace.beginSection(str);
|
||||
}
|
||||
|
||||
static void endSection() {
|
||||
Trace.endSection();
|
||||
}
|
||||
}
|
||||
}
|
27
02-Easy5/E5/sources/androidx/core/os/TraceKt.java
Normal file
27
02-Easy5/E5/sources/androidx/core/os/TraceKt.java
Normal file
@ -0,0 +1,27 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.InlineMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: Trace.kt */
|
||||
@Metadata(d1 = {"\u0000\u0012\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a-\u0010\u0000\u001a\u0002H\u0001\"\u0004\b\u0000\u0010\u00012\u0006\u0010\u0002\u001a\u00020\u00032\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u0002H\u00010\u0005H\u0087\bø\u0001\u0000¢\u0006\u0002\u0010\u0006\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006\u0007"}, d2 = {"trace", "T", "sectionName", "", "block", "Lkotlin/Function0;", "(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;", "core-ktx_release"}, k = 2, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class TraceKt {
|
||||
@Deprecated(message = "Use androidx.tracing.Trace instead", replaceWith = @ReplaceWith(expression = "trace(sectionName)", imports = {"androidx.tracing.trace"}))
|
||||
public static final <T> T trace(String sectionName, Function0<? extends T> block) {
|
||||
Intrinsics.checkNotNullParameter(sectionName, "sectionName");
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
TraceCompat.beginSection(sectionName);
|
||||
try {
|
||||
return block.invoke();
|
||||
} finally {
|
||||
InlineMarker.finallyStart(1);
|
||||
TraceCompat.endSection();
|
||||
InlineMarker.finallyEnd(1);
|
||||
}
|
||||
}
|
||||
}
|
66
02-Easy5/E5/sources/androidx/core/os/UserHandleCompat.java
Normal file
66
02-Easy5/E5/sources/androidx/core/os/UserHandleCompat.java
Normal file
@ -0,0 +1,66 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.UserHandle;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class UserHandleCompat {
|
||||
private static Method sGetUserIdMethod;
|
||||
private static Constructor<UserHandle> sUserHandleConstructor;
|
||||
|
||||
private UserHandleCompat() {
|
||||
}
|
||||
|
||||
public static UserHandle getUserHandleForUid(int i) {
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
return Api24Impl.getUserHandleForUid(i);
|
||||
}
|
||||
try {
|
||||
return getUserHandleConstructor().newInstance((Integer) getGetUserIdMethod().invoke(null, Integer.valueOf(i)));
|
||||
} catch (IllegalAccessException e) {
|
||||
IllegalAccessError illegalAccessError = new IllegalAccessError();
|
||||
illegalAccessError.initCause(e);
|
||||
throw illegalAccessError;
|
||||
} catch (InstantiationException e2) {
|
||||
InstantiationError instantiationError = new InstantiationError();
|
||||
instantiationError.initCause(e2);
|
||||
throw instantiationError;
|
||||
} catch (NoSuchMethodException e3) {
|
||||
NoSuchMethodError noSuchMethodError = new NoSuchMethodError();
|
||||
noSuchMethodError.initCause(e3);
|
||||
throw noSuchMethodError;
|
||||
} catch (InvocationTargetException e4) {
|
||||
throw new RuntimeException(e4);
|
||||
}
|
||||
}
|
||||
|
||||
private static class Api24Impl {
|
||||
private Api24Impl() {
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
27
02-Easy5/E5/sources/androidx/core/os/UserManagerCompat.java
Normal file
27
02-Easy5/E5/sources/androidx/core/os/UserManagerCompat.java
Normal file
@ -0,0 +1,27 @@
|
||||
package androidx.core.os;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.UserManager;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class UserManagerCompat {
|
||||
private UserManagerCompat() {
|
||||
}
|
||||
|
||||
public static boolean isUserUnlocked(Context context) {
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
return Api24Impl.isUserUnlocked(context);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static class Api24Impl {
|
||||
private Api24Impl() {
|
||||
}
|
||||
|
||||
static boolean isUserUnlocked(Context context) {
|
||||
return ((UserManager) context.getSystemService(UserManager.class)).isUserUnlocked();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user