Add Discord community version (64-bit only)

- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
This commit is contained in:
2026-02-18 15:48:36 -08:00
parent c19eb3d7ff
commit c080f0d97f
26930 changed files with 2529574 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
package _COROUTINE;
/* loaded from: classes.dex */
public final class ArtificialStackFrames {
public final StackTraceElement coroutineBoundary() {
StackTraceElement artificialFrame;
artificialFrame = CoroutineDebuggingKt.artificialFrame(new Exception(), _BOUNDARY.class.getSimpleName());
return artificialFrame;
}
}

View File

@@ -0,0 +1,11 @@
package _COROUTINE;
/* loaded from: classes.dex */
public abstract class CoroutineDebuggingKt {
public static final String ARTIFICIAL_FRAME_PACKAGE_NAME = "_COROUTINE";
public static final StackTraceElement artificialFrame(Throwable th, String str) {
StackTraceElement stackTraceElement = th.getStackTrace()[0];
return new StackTraceElement(ARTIFICIAL_FRAME_PACKAGE_NAME + '.' + str, "_", stackTraceElement.getFileName(), stackTraceElement.getLineNumber());
}
}

View File

@@ -0,0 +1,5 @@
package _COROUTINE;
/* loaded from: classes.dex */
public abstract class _BOUNDARY {
}

View File

@@ -0,0 +1,8 @@
package android.app;
/* loaded from: classes.dex */
public /* synthetic */ class AppComponentFactory {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.app;
/* loaded from: classes.dex */
public /* synthetic */ interface AppOpsManager$OnOpActiveChangedListener {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,10 @@
package android.app;
import android.os.Parcelable;
/* loaded from: classes.dex */
public final /* synthetic */ class ForegroundServiceStartNotAllowedException extends ServiceStartNotAllowedException implements Parcelable {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.app;
/* loaded from: classes.dex */
public /* synthetic */ class ServiceStartNotAllowedException extends IllegalStateException {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.content.pm;
/* loaded from: classes.dex */
public /* synthetic */ interface PackageManager$OnChecksumsReadyListener {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.graphics;
/* loaded from: classes.dex */
public /* synthetic */ interface ImageDecoder$OnHeaderDecodedListener {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.hardware.biometrics;
/* loaded from: classes.dex */
public /* synthetic */ class BiometricPrompt$AuthenticationCallback {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.media;
/* loaded from: classes.dex */
public /* synthetic */ class AudioTrack$StreamEventCallback {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.media;
/* loaded from: classes.dex */
public /* synthetic */ interface Spatializer$OnSpatializerStateChangedListener {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,5 @@
package android.net.http;
/* loaded from: classes.dex */
public abstract class SslError {
}

View File

@@ -0,0 +1,8 @@
package android.os;
/* loaded from: classes.dex */
public /* synthetic */ interface OutcomeReceiver {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,10 @@
package android.service.credentials;
import android.app.Service;
/* loaded from: classes.dex */
public /* synthetic */ class CredentialProviderService extends Service {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,371 @@
package android.support.customtabs;
import android.net.Uri;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import androidx.annotation.RestrictTo;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public interface ICustomTabsCallback extends IInterface {
public static final String DESCRIPTOR = "android$support$customtabs$ICustomTabsCallback".replace('$', '.');
public static class Default implements ICustomTabsCallback {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // android.support.customtabs.ICustomTabsCallback
public void extraCallback(String str, Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.ICustomTabsCallback
public Bundle extraCallbackWithResult(String str, Bundle bundle) throws RemoteException {
return null;
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onActivityLayout(int i, int i2, int i3, int i4, int i5, Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onActivityResized(int i, int i2, Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onMessageChannelReady(Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onMinimized(Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onNavigationEvent(int i, Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onPostMessage(String str, Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onRelationshipValidationResult(int i, Uri uri, boolean z, Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onUnminimized(Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onWarmupCompleted(Bundle bundle) throws RemoteException {
}
}
void extraCallback(String str, Bundle bundle) throws RemoteException;
Bundle extraCallbackWithResult(String str, Bundle bundle) throws RemoteException;
void onActivityLayout(int i, int i2, int i3, int i4, int i5, Bundle bundle) throws RemoteException;
void onActivityResized(int i, int i2, Bundle bundle) throws RemoteException;
void onMessageChannelReady(Bundle bundle) throws RemoteException;
void onMinimized(Bundle bundle) throws RemoteException;
void onNavigationEvent(int i, Bundle bundle) throws RemoteException;
void onPostMessage(String str, Bundle bundle) throws RemoteException;
void onRelationshipValidationResult(int i, Uri uri, boolean z, Bundle bundle) throws RemoteException;
void onUnminimized(Bundle bundle) throws RemoteException;
void onWarmupCompleted(Bundle bundle) throws RemoteException;
public static abstract class Stub extends Binder implements ICustomTabsCallback {
static final int TRANSACTION_extraCallback = 3;
static final int TRANSACTION_extraCallbackWithResult = 7;
static final int TRANSACTION_onActivityLayout = 10;
static final int TRANSACTION_onActivityResized = 8;
static final int TRANSACTION_onMessageChannelReady = 4;
static final int TRANSACTION_onMinimized = 11;
static final int TRANSACTION_onNavigationEvent = 2;
static final int TRANSACTION_onPostMessage = 5;
static final int TRANSACTION_onRelationshipValidationResult = 6;
static final int TRANSACTION_onUnminimized = 12;
static final int TRANSACTION_onWarmupCompleted = 9;
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, ICustomTabsCallback.DESCRIPTOR);
}
public static ICustomTabsCallback asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(ICustomTabsCallback.DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof ICustomTabsCallback)) {
return (ICustomTabsCallback) queryLocalInterface;
}
return new Proxy(iBinder);
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
String str = ICustomTabsCallback.DESCRIPTOR;
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(str);
}
if (i == 1598968902) {
parcel2.writeString(str);
return true;
}
switch (i) {
case 2:
onNavigationEvent(parcel.readInt(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
return true;
case 3:
extraCallback(parcel.readString(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
return true;
case 4:
onMessageChannelReady((Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
return true;
case 5:
onPostMessage(parcel.readString(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
return true;
case 6:
onRelationshipValidationResult(parcel.readInt(), (Uri) _Parcel.readTypedObject(parcel, Uri.CREATOR), parcel.readInt() != 0, (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
return true;
case 7:
Bundle extraCallbackWithResult = extraCallbackWithResult(parcel.readString(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
_Parcel.writeTypedObject(parcel2, extraCallbackWithResult, 1);
return true;
case 8:
onActivityResized(parcel.readInt(), parcel.readInt(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
return true;
case 9:
onWarmupCompleted((Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
return true;
case 10:
onActivityLayout(parcel.readInt(), parcel.readInt(), parcel.readInt(), parcel.readInt(), parcel.readInt(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
return true;
case 11:
onMinimized((Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
return true;
case 12:
onUnminimized((Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
return true;
default:
return super.onTransact(i, parcel, parcel2, i2);
}
}
public static class Proxy implements ICustomTabsCallback {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return ICustomTabsCallback.DESCRIPTOR;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onNavigationEvent(int i, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
obtain.writeInt(i);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(2, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsCallback
public void extraCallback(String str, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
obtain.writeString(str);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(3, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onMessageChannelReady(Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(4, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onPostMessage(String str, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
obtain.writeString(str);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(5, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onRelationshipValidationResult(int i, Uri uri, boolean z, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
obtain.writeInt(i);
_Parcel.writeTypedObject(obtain, uri, 0);
obtain.writeInt(z ? 1 : 0);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(6, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsCallback
public Bundle extraCallbackWithResult(String str, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
obtain.writeString(str);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(7, obtain, obtain2, 0);
obtain2.readException();
return (Bundle) _Parcel.readTypedObject(obtain2, Bundle.CREATOR);
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onActivityResized(int i, int i2, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
obtain.writeInt(i);
obtain.writeInt(i2);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(8, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onWarmupCompleted(Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(9, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onActivityLayout(int i, int i2, int i3, int i4, int i5, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
obtain.writeInt(i);
obtain.writeInt(i2);
obtain.writeInt(i3);
obtain.writeInt(i4);
obtain.writeInt(i5);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(10, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onMinimized(Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(11, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsCallback
public void onUnminimized(Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsCallback.DESCRIPTOR);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(12, obtain, null, 1);
} finally {
obtain.recycle();
}
}
}
}
public static class _Parcel {
/* JADX INFO: Access modifiers changed from: private */
public static <T> T readTypedObject(Parcel parcel, Parcelable.Creator<T> creator) {
if (parcel.readInt() != 0) {
return creator.createFromParcel(parcel);
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedObject(Parcel parcel, T t, int i) {
if (t != null) {
parcel.writeInt(1);
t.writeToParcel(parcel, i);
} else {
parcel.writeInt(0);
}
}
}
}

View File

@@ -0,0 +1,515 @@
package android.support.customtabs;
import android.net.Uri;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.support.customtabs.ICustomTabsCallback;
import androidx.annotation.RestrictTo;
import java.util.List;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public interface ICustomTabsService extends IInterface {
public static final String DESCRIPTOR = "android$support$customtabs$ICustomTabsService".replace('$', '.');
public static class Default implements ICustomTabsService {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // android.support.customtabs.ICustomTabsService
public Bundle extraCommand(String str, Bundle bundle) throws RemoteException {
return null;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean isEngagementSignalsApiAvailable(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException {
return false;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean mayLaunchUrl(ICustomTabsCallback iCustomTabsCallback, Uri uri, Bundle bundle, List<Bundle> list) throws RemoteException {
return false;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean newSession(ICustomTabsCallback iCustomTabsCallback) throws RemoteException {
return false;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean newSessionWithExtras(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException {
return false;
}
@Override // android.support.customtabs.ICustomTabsService
public int postMessage(ICustomTabsCallback iCustomTabsCallback, String str, Bundle bundle) throws RemoteException {
return 0;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean receiveFile(ICustomTabsCallback iCustomTabsCallback, Uri uri, int i, Bundle bundle) throws RemoteException {
return false;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean requestPostMessageChannel(ICustomTabsCallback iCustomTabsCallback, Uri uri) throws RemoteException {
return false;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean requestPostMessageChannelWithExtras(ICustomTabsCallback iCustomTabsCallback, Uri uri, Bundle bundle) throws RemoteException {
return false;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean setEngagementSignalsCallback(ICustomTabsCallback iCustomTabsCallback, IBinder iBinder, Bundle bundle) throws RemoteException {
return false;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean updateVisuals(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException {
return false;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean validateRelationship(ICustomTabsCallback iCustomTabsCallback, int i, Uri uri, Bundle bundle) throws RemoteException {
return false;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean warmup(long j) throws RemoteException {
return false;
}
}
Bundle extraCommand(String str, Bundle bundle) throws RemoteException;
boolean isEngagementSignalsApiAvailable(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException;
boolean mayLaunchUrl(ICustomTabsCallback iCustomTabsCallback, Uri uri, Bundle bundle, List<Bundle> list) throws RemoteException;
boolean newSession(ICustomTabsCallback iCustomTabsCallback) throws RemoteException;
boolean newSessionWithExtras(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException;
int postMessage(ICustomTabsCallback iCustomTabsCallback, String str, Bundle bundle) throws RemoteException;
boolean receiveFile(ICustomTabsCallback iCustomTabsCallback, Uri uri, int i, Bundle bundle) throws RemoteException;
boolean requestPostMessageChannel(ICustomTabsCallback iCustomTabsCallback, Uri uri) throws RemoteException;
boolean requestPostMessageChannelWithExtras(ICustomTabsCallback iCustomTabsCallback, Uri uri, Bundle bundle) throws RemoteException;
boolean setEngagementSignalsCallback(ICustomTabsCallback iCustomTabsCallback, IBinder iBinder, Bundle bundle) throws RemoteException;
boolean updateVisuals(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException;
boolean validateRelationship(ICustomTabsCallback iCustomTabsCallback, int i, Uri uri, Bundle bundle) throws RemoteException;
boolean warmup(long j) throws RemoteException;
public static abstract class Stub extends Binder implements ICustomTabsService {
static final int TRANSACTION_extraCommand = 5;
static final int TRANSACTION_isEngagementSignalsApiAvailable = 13;
static final int TRANSACTION_mayLaunchUrl = 4;
static final int TRANSACTION_newSession = 3;
static final int TRANSACTION_newSessionWithExtras = 10;
static final int TRANSACTION_postMessage = 8;
static final int TRANSACTION_receiveFile = 12;
static final int TRANSACTION_requestPostMessageChannel = 7;
static final int TRANSACTION_requestPostMessageChannelWithExtras = 11;
static final int TRANSACTION_setEngagementSignalsCallback = 14;
static final int TRANSACTION_updateVisuals = 6;
static final int TRANSACTION_validateRelationship = 9;
static final int TRANSACTION_warmup = 2;
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, ICustomTabsService.DESCRIPTOR);
}
public static ICustomTabsService asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(ICustomTabsService.DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof ICustomTabsService)) {
return (ICustomTabsService) queryLocalInterface;
}
return new Proxy(iBinder);
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
String str = ICustomTabsService.DESCRIPTOR;
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(str);
}
if (i == 1598968902) {
parcel2.writeString(str);
return true;
}
switch (i) {
case 2:
boolean warmup = warmup(parcel.readLong());
parcel2.writeNoException();
parcel2.writeInt(warmup ? 1 : 0);
return true;
case 3:
boolean newSession = newSession(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()));
parcel2.writeNoException();
parcel2.writeInt(newSession ? 1 : 0);
return true;
case 4:
ICustomTabsCallback asInterface = ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder());
Uri uri = (Uri) _Parcel.readTypedObject(parcel, Uri.CREATOR);
Parcelable.Creator creator = Bundle.CREATOR;
boolean mayLaunchUrl = mayLaunchUrl(asInterface, uri, (Bundle) _Parcel.readTypedObject(parcel, creator), parcel.createTypedArrayList(creator));
parcel2.writeNoException();
parcel2.writeInt(mayLaunchUrl ? 1 : 0);
return true;
case 5:
Bundle extraCommand = extraCommand(parcel.readString(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
_Parcel.writeTypedObject(parcel2, extraCommand, 1);
return true;
case 6:
boolean updateVisuals = updateVisuals(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
parcel2.writeInt(updateVisuals ? 1 : 0);
return true;
case 7:
boolean requestPostMessageChannel = requestPostMessageChannel(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), (Uri) _Parcel.readTypedObject(parcel, Uri.CREATOR));
parcel2.writeNoException();
parcel2.writeInt(requestPostMessageChannel ? 1 : 0);
return true;
case 8:
int postMessage = postMessage(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), parcel.readString(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
parcel2.writeInt(postMessage);
return true;
case 9:
boolean validateRelationship = validateRelationship(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), parcel.readInt(), (Uri) _Parcel.readTypedObject(parcel, Uri.CREATOR), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
parcel2.writeInt(validateRelationship ? 1 : 0);
return true;
case 10:
boolean newSessionWithExtras = newSessionWithExtras(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
parcel2.writeInt(newSessionWithExtras ? 1 : 0);
return true;
case 11:
boolean requestPostMessageChannelWithExtras = requestPostMessageChannelWithExtras(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), (Uri) _Parcel.readTypedObject(parcel, Uri.CREATOR), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
parcel2.writeInt(requestPostMessageChannelWithExtras ? 1 : 0);
return true;
case 12:
boolean receiveFile = receiveFile(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), (Uri) _Parcel.readTypedObject(parcel, Uri.CREATOR), parcel.readInt(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
parcel2.writeInt(receiveFile ? 1 : 0);
return true;
case 13:
boolean isEngagementSignalsApiAvailable = isEngagementSignalsApiAvailable(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
parcel2.writeInt(isEngagementSignalsApiAvailable ? 1 : 0);
return true;
case 14:
boolean engagementSignalsCallback = setEngagementSignalsCallback(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), parcel.readStrongBinder(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
parcel2.writeInt(engagementSignalsCallback ? 1 : 0);
return true;
default:
return super.onTransact(i, parcel, parcel2, i2);
}
}
public static class Proxy implements ICustomTabsService {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return ICustomTabsService.DESCRIPTOR;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.support.customtabs.ICustomTabsService
public boolean warmup(long j) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeLong(j);
this.mRemote.transact(2, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public boolean newSession(ICustomTabsCallback iCustomTabsCallback) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
this.mRemote.transact(3, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public boolean newSessionWithExtras(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(10, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public boolean mayLaunchUrl(ICustomTabsCallback iCustomTabsCallback, Uri uri, Bundle bundle, List<Bundle> list) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
_Parcel.writeTypedObject(obtain, uri, 0);
_Parcel.writeTypedObject(obtain, bundle, 0);
_Parcel.writeTypedList(obtain, list, 0);
this.mRemote.transact(4, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public Bundle extraCommand(String str, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeString(str);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(5, obtain, obtain2, 0);
obtain2.readException();
return (Bundle) _Parcel.readTypedObject(obtain2, Bundle.CREATOR);
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public boolean updateVisuals(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(6, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public boolean requestPostMessageChannel(ICustomTabsCallback iCustomTabsCallback, Uri uri) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
_Parcel.writeTypedObject(obtain, uri, 0);
this.mRemote.transact(7, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public boolean requestPostMessageChannelWithExtras(ICustomTabsCallback iCustomTabsCallback, Uri uri, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
_Parcel.writeTypedObject(obtain, uri, 0);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(11, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public int postMessage(ICustomTabsCallback iCustomTabsCallback, String str, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
obtain.writeString(str);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(8, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public boolean validateRelationship(ICustomTabsCallback iCustomTabsCallback, int i, Uri uri, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
obtain.writeInt(i);
_Parcel.writeTypedObject(obtain, uri, 0);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(9, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public boolean receiveFile(ICustomTabsCallback iCustomTabsCallback, Uri uri, int i, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
_Parcel.writeTypedObject(obtain, uri, 0);
obtain.writeInt(i);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(12, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public boolean isEngagementSignalsApiAvailable(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(13, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.ICustomTabsService
public boolean setEngagementSignalsCallback(ICustomTabsCallback iCustomTabsCallback, IBinder iBinder, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ICustomTabsService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
obtain.writeStrongBinder(iBinder);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(14, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt() != 0;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
}
}
public static class _Parcel {
/* JADX INFO: Access modifiers changed from: private */
public static <T> T readTypedObject(Parcel parcel, Parcelable.Creator<T> creator) {
if (parcel.readInt() != 0) {
return creator.createFromParcel(parcel);
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedObject(Parcel parcel, T t, int i) {
if (t != null) {
parcel.writeInt(1);
t.writeToParcel(parcel, i);
} else {
parcel.writeInt(0);
}
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedList(Parcel parcel, List<T> list, int i) {
if (list == null) {
parcel.writeInt(-1);
return;
}
int size = list.size();
parcel.writeInt(size);
for (int i2 = 0; i2 < size; i2++) {
writeTypedObject(parcel, list.get(i2), i);
}
}
}
}

View File

@@ -0,0 +1,165 @@
package android.support.customtabs;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import androidx.annotation.RestrictTo;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public interface IEngagementSignalsCallback extends IInterface {
public static final String DESCRIPTOR = "android$support$customtabs$IEngagementSignalsCallback".replace('$', '.');
public static class Default implements IEngagementSignalsCallback {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // android.support.customtabs.IEngagementSignalsCallback
public void onGreatestScrollPercentageIncreased(int i, Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.IEngagementSignalsCallback
public void onSessionEnded(boolean z, Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.IEngagementSignalsCallback
public void onVerticalScrollEvent(boolean z, Bundle bundle) throws RemoteException {
}
}
void onGreatestScrollPercentageIncreased(int i, Bundle bundle) throws RemoteException;
void onSessionEnded(boolean z, Bundle bundle) throws RemoteException;
void onVerticalScrollEvent(boolean z, Bundle bundle) throws RemoteException;
public static abstract class Stub extends Binder implements IEngagementSignalsCallback {
static final int TRANSACTION_onGreatestScrollPercentageIncreased = 3;
static final int TRANSACTION_onSessionEnded = 4;
static final int TRANSACTION_onVerticalScrollEvent = 2;
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, IEngagementSignalsCallback.DESCRIPTOR);
}
public static IEngagementSignalsCallback asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(IEngagementSignalsCallback.DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof IEngagementSignalsCallback)) {
return (IEngagementSignalsCallback) queryLocalInterface;
}
return new Proxy(iBinder);
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
String str = IEngagementSignalsCallback.DESCRIPTOR;
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(str);
}
if (i == 1598968902) {
parcel2.writeString(str);
return true;
}
if (i == 2) {
onVerticalScrollEvent(parcel.readInt() != 0, (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
} else if (i == 3) {
onGreatestScrollPercentageIncreased(parcel.readInt(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
} else if (i == 4) {
onSessionEnded(parcel.readInt() != 0, (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
} else {
return super.onTransact(i, parcel, parcel2, i2);
}
return true;
}
public static class Proxy implements IEngagementSignalsCallback {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return IEngagementSignalsCallback.DESCRIPTOR;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.support.customtabs.IEngagementSignalsCallback
public void onVerticalScrollEvent(boolean z, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IEngagementSignalsCallback.DESCRIPTOR);
obtain.writeInt(z ? 1 : 0);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(2, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.customtabs.IEngagementSignalsCallback
public void onGreatestScrollPercentageIncreased(int i, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IEngagementSignalsCallback.DESCRIPTOR);
obtain.writeInt(i);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(3, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.customtabs.IEngagementSignalsCallback
public void onSessionEnded(boolean z, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IEngagementSignalsCallback.DESCRIPTOR);
obtain.writeInt(z ? 1 : 0);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(4, obtain, null, 1);
} finally {
obtain.recycle();
}
}
}
}
public static class _Parcel {
/* JADX INFO: Access modifiers changed from: private */
public static <T> T readTypedObject(Parcel parcel, Parcelable.Creator<T> creator) {
if (parcel.readInt() != 0) {
return creator.createFromParcel(parcel);
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedObject(Parcel parcel, T t, int i) {
if (t != null) {
parcel.writeInt(1);
t.writeToParcel(parcel, i);
} else {
parcel.writeInt(0);
}
}
}
}

View File

@@ -0,0 +1,153 @@
package android.support.customtabs;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.support.customtabs.ICustomTabsCallback;
import androidx.annotation.RestrictTo;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public interface IPostMessageService extends IInterface {
public static final String DESCRIPTOR = "android$support$customtabs$IPostMessageService".replace('$', '.');
public static class Default implements IPostMessageService {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // android.support.customtabs.IPostMessageService
public void onMessageChannelReady(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.IPostMessageService
public void onPostMessage(ICustomTabsCallback iCustomTabsCallback, String str, Bundle bundle) throws RemoteException {
}
}
void onMessageChannelReady(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException;
void onPostMessage(ICustomTabsCallback iCustomTabsCallback, String str, Bundle bundle) throws RemoteException;
public static abstract class Stub extends Binder implements IPostMessageService {
static final int TRANSACTION_onMessageChannelReady = 2;
static final int TRANSACTION_onPostMessage = 3;
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, IPostMessageService.DESCRIPTOR);
}
public static IPostMessageService asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(IPostMessageService.DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof IPostMessageService)) {
return (IPostMessageService) queryLocalInterface;
}
return new Proxy(iBinder);
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
String str = IPostMessageService.DESCRIPTOR;
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(str);
}
if (i == 1598968902) {
parcel2.writeString(str);
return true;
}
if (i == 2) {
onMessageChannelReady(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
} else if (i == 3) {
onPostMessage(ICustomTabsCallback.Stub.asInterface(parcel.readStrongBinder()), parcel.readString(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
} else {
return super.onTransact(i, parcel, parcel2, i2);
}
return true;
}
public static class Proxy implements IPostMessageService {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return IPostMessageService.DESCRIPTOR;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.support.customtabs.IPostMessageService
public void onMessageChannelReady(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(IPostMessageService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(2, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.IPostMessageService
public void onPostMessage(ICustomTabsCallback iCustomTabsCallback, String str, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(IPostMessageService.DESCRIPTOR);
obtain.writeStrongInterface(iCustomTabsCallback);
obtain.writeString(str);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(3, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
}
}
public static class _Parcel {
/* JADX INFO: Access modifiers changed from: private */
public static <T> T readTypedObject(Parcel parcel, Parcelable.Creator<T> creator) {
if (parcel.readInt() != 0) {
return creator.createFromParcel(parcel);
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedObject(Parcel parcel, T t, int i) {
if (t != null) {
parcel.writeInt(1);
t.writeToParcel(parcel, i);
} else {
parcel.writeInt(0);
}
}
}
}

View File

@@ -0,0 +1,124 @@
package android.support.customtabs.trusted;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import androidx.annotation.RestrictTo;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public interface ITrustedWebActivityCallback extends IInterface {
public static final String DESCRIPTOR = "android$support$customtabs$trusted$ITrustedWebActivityCallback".replace('$', '.');
public static class Default implements ITrustedWebActivityCallback {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityCallback
public void onExtraCallback(String str, Bundle bundle) throws RemoteException {
}
}
void onExtraCallback(String str, Bundle bundle) throws RemoteException;
public static abstract class Stub extends Binder implements ITrustedWebActivityCallback {
static final int TRANSACTION_onExtraCallback = 2;
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, ITrustedWebActivityCallback.DESCRIPTOR);
}
public static ITrustedWebActivityCallback asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(ITrustedWebActivityCallback.DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof ITrustedWebActivityCallback)) {
return (ITrustedWebActivityCallback) queryLocalInterface;
}
return new Proxy(iBinder);
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
String str = ITrustedWebActivityCallback.DESCRIPTOR;
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(str);
}
if (i == 1598968902) {
parcel2.writeString(str);
return true;
}
if (i == 2) {
onExtraCallback(parcel.readString(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
return true;
}
return super.onTransact(i, parcel, parcel2, i2);
}
public static class Proxy implements ITrustedWebActivityCallback {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return ITrustedWebActivityCallback.DESCRIPTOR;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityCallback
public void onExtraCallback(String str, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ITrustedWebActivityCallback.DESCRIPTOR);
obtain.writeString(str);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(2, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
}
}
public static class _Parcel {
/* JADX INFO: Access modifiers changed from: private */
public static <T> T readTypedObject(Parcel parcel, Parcelable.Creator<T> creator) {
if (parcel.readInt() != 0) {
return creator.createFromParcel(parcel);
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedObject(Parcel parcel, T t, int i) {
if (t != null) {
parcel.writeInt(1);
t.writeToParcel(parcel, i);
} else {
parcel.writeInt(0);
}
}
}
}

View File

@@ -0,0 +1,299 @@
package android.support.customtabs.trusted;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import androidx.annotation.RestrictTo;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public interface ITrustedWebActivityService extends IInterface {
public static final String DESCRIPTOR = "android$support$customtabs$trusted$ITrustedWebActivityService".replace('$', '.');
public static class Default implements ITrustedWebActivityService {
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public Bundle areNotificationsEnabled(Bundle bundle) throws RemoteException {
return null;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public void cancelNotification(Bundle bundle) throws RemoteException {
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public Bundle extraCommand(String str, Bundle bundle, IBinder iBinder) throws RemoteException {
return null;
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public Bundle getActiveNotifications() throws RemoteException {
return null;
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public Bundle getSmallIconBitmap() throws RemoteException {
return null;
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public int getSmallIconId() throws RemoteException {
return 0;
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public Bundle notifyNotificationWithChannel(Bundle bundle) throws RemoteException {
return null;
}
}
Bundle areNotificationsEnabled(Bundle bundle) throws RemoteException;
void cancelNotification(Bundle bundle) throws RemoteException;
Bundle extraCommand(String str, Bundle bundle, IBinder iBinder) throws RemoteException;
Bundle getActiveNotifications() throws RemoteException;
Bundle getSmallIconBitmap() throws RemoteException;
int getSmallIconId() throws RemoteException;
Bundle notifyNotificationWithChannel(Bundle bundle) throws RemoteException;
public static abstract class Stub extends Binder implements ITrustedWebActivityService {
static final int TRANSACTION_areNotificationsEnabled = 6;
static final int TRANSACTION_cancelNotification = 3;
static final int TRANSACTION_extraCommand = 9;
static final int TRANSACTION_getActiveNotifications = 5;
static final int TRANSACTION_getSmallIconBitmap = 7;
static final int TRANSACTION_getSmallIconId = 4;
static final int TRANSACTION_notifyNotificationWithChannel = 2;
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, ITrustedWebActivityService.DESCRIPTOR);
}
public static ITrustedWebActivityService asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(ITrustedWebActivityService.DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof ITrustedWebActivityService)) {
return (ITrustedWebActivityService) queryLocalInterface;
}
return new Proxy(iBinder);
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
String str = ITrustedWebActivityService.DESCRIPTOR;
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(str);
}
if (i == 1598968902) {
parcel2.writeString(str);
return true;
}
switch (i) {
case 2:
Bundle notifyNotificationWithChannel = notifyNotificationWithChannel((Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
_Parcel.writeTypedObject(parcel2, notifyNotificationWithChannel, 1);
return true;
case 3:
cancelNotification((Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
return true;
case 4:
int smallIconId = getSmallIconId();
parcel2.writeNoException();
parcel2.writeInt(smallIconId);
return true;
case 5:
Bundle activeNotifications = getActiveNotifications();
parcel2.writeNoException();
_Parcel.writeTypedObject(parcel2, activeNotifications, 1);
return true;
case 6:
Bundle areNotificationsEnabled = areNotificationsEnabled((Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
parcel2.writeNoException();
_Parcel.writeTypedObject(parcel2, areNotificationsEnabled, 1);
return true;
case 7:
Bundle smallIconBitmap = getSmallIconBitmap();
parcel2.writeNoException();
_Parcel.writeTypedObject(parcel2, smallIconBitmap, 1);
return true;
case 8:
default:
return super.onTransact(i, parcel, parcel2, i2);
case 9:
Bundle extraCommand = extraCommand(parcel.readString(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR), parcel.readStrongBinder());
parcel2.writeNoException();
_Parcel.writeTypedObject(parcel2, extraCommand, 1);
return true;
}
}
public static class Proxy implements ITrustedWebActivityService {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return ITrustedWebActivityService.DESCRIPTOR;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public Bundle areNotificationsEnabled(Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ITrustedWebActivityService.DESCRIPTOR);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(6, obtain, obtain2, 0);
obtain2.readException();
return (Bundle) _Parcel.readTypedObject(obtain2, Bundle.CREATOR);
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public Bundle notifyNotificationWithChannel(Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ITrustedWebActivityService.DESCRIPTOR);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(2, obtain, obtain2, 0);
obtain2.readException();
return (Bundle) _Parcel.readTypedObject(obtain2, Bundle.CREATOR);
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public void cancelNotification(Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ITrustedWebActivityService.DESCRIPTOR);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(3, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public Bundle getActiveNotifications() throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ITrustedWebActivityService.DESCRIPTOR);
this.mRemote.transact(5, obtain, obtain2, 0);
obtain2.readException();
return (Bundle) _Parcel.readTypedObject(obtain2, Bundle.CREATOR);
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public int getSmallIconId() throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ITrustedWebActivityService.DESCRIPTOR);
this.mRemote.transact(4, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public Bundle getSmallIconBitmap() throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ITrustedWebActivityService.DESCRIPTOR);
this.mRemote.transact(7, obtain, obtain2, 0);
obtain2.readException();
return (Bundle) _Parcel.readTypedObject(obtain2, Bundle.CREATOR);
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // android.support.customtabs.trusted.ITrustedWebActivityService
public Bundle extraCommand(String str, Bundle bundle, IBinder iBinder) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(ITrustedWebActivityService.DESCRIPTOR);
obtain.writeString(str);
_Parcel.writeTypedObject(obtain, bundle, 0);
obtain.writeStrongBinder(iBinder);
this.mRemote.transact(9, obtain, obtain2, 0);
obtain2.readException();
return (Bundle) _Parcel.readTypedObject(obtain2, Bundle.CREATOR);
} finally {
obtain2.recycle();
obtain.recycle();
}
}
}
}
public static class _Parcel {
/* JADX INFO: Access modifiers changed from: private */
public static <T> T readTypedObject(Parcel parcel, Parcelable.Creator<T> creator) {
if (parcel.readInt() != 0) {
return creator.createFromParcel(parcel);
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedObject(Parcel parcel, T t, int i) {
if (t != null) {
parcel.writeInt(1);
t.writeToParcel(parcel, i);
} else {
parcel.writeInt(0);
}
}
}
}

View File

@@ -0,0 +1,167 @@
package android.support.v4.app;
import android.app.Notification;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import androidx.annotation.RestrictTo;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public interface INotificationSideChannel extends IInterface {
public static final String DESCRIPTOR = "android$support$v4$app$INotificationSideChannel".replace('$', '.');
public static class Default implements INotificationSideChannel {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // android.support.v4.app.INotificationSideChannel
public void cancel(String str, int i, String str2) throws RemoteException {
}
@Override // android.support.v4.app.INotificationSideChannel
public void cancelAll(String str) throws RemoteException {
}
@Override // android.support.v4.app.INotificationSideChannel
public void notify(String str, int i, String str2, Notification notification) throws RemoteException {
}
}
void cancel(String str, int i, String str2) throws RemoteException;
void cancelAll(String str) throws RemoteException;
void notify(String str, int i, String str2, Notification notification) throws RemoteException;
public static abstract class Stub extends Binder implements INotificationSideChannel {
static final int TRANSACTION_cancel = 2;
static final int TRANSACTION_cancelAll = 3;
static final int TRANSACTION_notify = 1;
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, INotificationSideChannel.DESCRIPTOR);
}
public static INotificationSideChannel asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(INotificationSideChannel.DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof INotificationSideChannel)) {
return (INotificationSideChannel) queryLocalInterface;
}
return new Proxy(iBinder);
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
String str = INotificationSideChannel.DESCRIPTOR;
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(str);
}
if (i == 1598968902) {
parcel2.writeString(str);
return true;
}
if (i == 1) {
notify(parcel.readString(), parcel.readInt(), parcel.readString(), (Notification) _Parcel.readTypedObject(parcel, Notification.CREATOR));
} else if (i == 2) {
cancel(parcel.readString(), parcel.readInt(), parcel.readString());
} else if (i == 3) {
cancelAll(parcel.readString());
} else {
return super.onTransact(i, parcel, parcel2, i2);
}
return true;
}
public static class Proxy implements INotificationSideChannel {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return INotificationSideChannel.DESCRIPTOR;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.support.v4.app.INotificationSideChannel
public void notify(String str, int i, String str2, Notification notification) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(INotificationSideChannel.DESCRIPTOR);
obtain.writeString(str);
obtain.writeInt(i);
obtain.writeString(str2);
_Parcel.writeTypedObject(obtain, notification, 0);
this.mRemote.transact(1, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.v4.app.INotificationSideChannel
public void cancel(String str, int i, String str2) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(INotificationSideChannel.DESCRIPTOR);
obtain.writeString(str);
obtain.writeInt(i);
obtain.writeString(str2);
this.mRemote.transact(2, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // android.support.v4.app.INotificationSideChannel
public void cancelAll(String str) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(INotificationSideChannel.DESCRIPTOR);
obtain.writeString(str);
this.mRemote.transact(3, obtain, null, 1);
} finally {
obtain.recycle();
}
}
}
}
public static class _Parcel {
/* JADX INFO: Access modifiers changed from: private */
public static <T> T readTypedObject(Parcel parcel, Parcelable.Creator<T> creator) {
if (parcel.readInt() != 0) {
return creator.createFromParcel(parcel);
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedObject(Parcel parcel, T t, int i) {
if (t != null) {
parcel.writeInt(1);
t.writeToParcel(parcel, i);
} else {
parcel.writeInt(0);
}
}
}
}

View File

@@ -0,0 +1,17 @@
package android.support.v4.app;
import androidx.annotation.RestrictTo;
import androidx.core.app.RemoteActionCompat;
import androidx.versionedparcelable.VersionedParcel;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public final class RemoteActionCompatParcelizer extends androidx.core.app.RemoteActionCompatParcelizer {
public static RemoteActionCompat read(VersionedParcel versionedParcel) {
return androidx.core.app.RemoteActionCompatParcelizer.read(versionedParcel);
}
public static void write(RemoteActionCompat remoteActionCompat, VersionedParcel versionedParcel) {
androidx.core.app.RemoteActionCompatParcelizer.write(remoteActionCompat, versionedParcel);
}
}

View File

@@ -0,0 +1,17 @@
package android.support.v4.graphics.drawable;
import androidx.annotation.RestrictTo;
import androidx.core.graphics.drawable.IconCompat;
import androidx.versionedparcelable.VersionedParcel;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public final class IconCompatParcelizer extends androidx.core.graphics.drawable.IconCompatParcelizer {
public static IconCompat read(VersionedParcel versionedParcel) {
return androidx.core.graphics.drawable.IconCompatParcelizer.read(versionedParcel);
}
public static void write(IconCompat iconCompat, VersionedParcel versionedParcel) {
androidx.core.graphics.drawable.IconCompatParcelizer.write(iconCompat, versionedParcel);
}
}

View File

@@ -0,0 +1,17 @@
package android.support.v4.media;
import androidx.annotation.RestrictTo;
import androidx.media.AudioAttributesCompat;
import androidx.versionedparcelable.VersionedParcel;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public final class AudioAttributesCompatParcelizer extends androidx.media.AudioAttributesCompatParcelizer {
public static AudioAttributesCompat read(VersionedParcel versionedParcel) {
return androidx.media.AudioAttributesCompatParcelizer.read(versionedParcel);
}
public static void write(AudioAttributesCompat audioAttributesCompat, VersionedParcel versionedParcel) {
androidx.media.AudioAttributesCompatParcelizer.write(audioAttributesCompat, versionedParcel);
}
}

View File

@@ -0,0 +1,17 @@
package android.support.v4.media;
import androidx.annotation.RestrictTo;
import androidx.media.AudioAttributesImplApi21;
import androidx.versionedparcelable.VersionedParcel;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public final class AudioAttributesImplApi21Parcelizer extends androidx.media.AudioAttributesImplApi21Parcelizer {
public static AudioAttributesImplApi21 read(VersionedParcel versionedParcel) {
return androidx.media.AudioAttributesImplApi21Parcelizer.read(versionedParcel);
}
public static void write(AudioAttributesImplApi21 audioAttributesImplApi21, VersionedParcel versionedParcel) {
androidx.media.AudioAttributesImplApi21Parcelizer.write(audioAttributesImplApi21, versionedParcel);
}
}

View File

@@ -0,0 +1,17 @@
package android.support.v4.media;
import androidx.annotation.RestrictTo;
import androidx.media.AudioAttributesImplApi26;
import androidx.versionedparcelable.VersionedParcel;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public final class AudioAttributesImplApi26Parcelizer extends androidx.media.AudioAttributesImplApi26Parcelizer {
public static AudioAttributesImplApi26 read(VersionedParcel versionedParcel) {
return androidx.media.AudioAttributesImplApi26Parcelizer.read(versionedParcel);
}
public static void write(AudioAttributesImplApi26 audioAttributesImplApi26, VersionedParcel versionedParcel) {
androidx.media.AudioAttributesImplApi26Parcelizer.write(audioAttributesImplApi26, versionedParcel);
}
}

View File

@@ -0,0 +1,17 @@
package android.support.v4.media;
import androidx.annotation.RestrictTo;
import androidx.media.AudioAttributesImplBase;
import androidx.versionedparcelable.VersionedParcel;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public final class AudioAttributesImplBaseParcelizer extends androidx.media.AudioAttributesImplBaseParcelizer {
public static AudioAttributesImplBase read(VersionedParcel versionedParcel) {
return androidx.media.AudioAttributesImplBaseParcelizer.read(versionedParcel);
}
public static void write(AudioAttributesImplBase audioAttributesImplBase, VersionedParcel versionedParcel) {
androidx.media.AudioAttributesImplBaseParcelizer.write(audioAttributesImplBase, versionedParcel);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,277 @@
package android.support.v4.media;
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.media.MediaDescription;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
@SuppressLint({"BanParcelableUsage"})
/* loaded from: classes.dex */
public final class MediaDescriptionCompat implements Parcelable {
public static final long BT_FOLDER_TYPE_ALBUMS = 2;
public static final long BT_FOLDER_TYPE_ARTISTS = 3;
public static final long BT_FOLDER_TYPE_GENRES = 4;
public static final long BT_FOLDER_TYPE_MIXED = 0;
public static final long BT_FOLDER_TYPE_PLAYLISTS = 5;
public static final long BT_FOLDER_TYPE_TITLES = 1;
public static final long BT_FOLDER_TYPE_YEARS = 6;
public static final Parcelable.Creator<MediaDescriptionCompat> CREATOR = new Parcelable.Creator<MediaDescriptionCompat>() { // from class: android.support.v4.media.MediaDescriptionCompat.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public MediaDescriptionCompat createFromParcel(Parcel parcel) {
return MediaDescriptionCompat.fromMediaDescription(MediaDescription.CREATOR.createFromParcel(parcel));
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public MediaDescriptionCompat[] newArray(int i) {
return new MediaDescriptionCompat[i];
}
};
@RestrictTo({RestrictTo.Scope.LIBRARY})
public static final String DESCRIPTION_KEY_MEDIA_URI = "android.support.v4.media.description.MEDIA_URI";
@RestrictTo({RestrictTo.Scope.LIBRARY})
public static final String DESCRIPTION_KEY_NULL_BUNDLE_FLAG = "android.support.v4.media.description.NULL_BUNDLE_FLAG";
public static final String EXTRA_BT_FOLDER_TYPE = "android.media.extra.BT_FOLDER_TYPE";
public static final String EXTRA_DOWNLOAD_STATUS = "android.media.extra.DOWNLOAD_STATUS";
public static final long STATUS_DOWNLOADED = 2;
public static final long STATUS_DOWNLOADING = 1;
public static final long STATUS_NOT_DOWNLOADED = 0;
private static final String TAG = "MediaDescriptionCompat";
private final CharSequence mDescription;
private MediaDescription mDescriptionFwk;
private final Bundle mExtras;
private final Bitmap mIcon;
private final Uri mIconUri;
private final String mMediaId;
private final Uri mMediaUri;
private final CharSequence mSubtitle;
private final CharSequence mTitle;
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
@Nullable
public CharSequence getDescription() {
return this.mDescription;
}
@Nullable
public Bundle getExtras() {
return this.mExtras;
}
@Nullable
public Bitmap getIconBitmap() {
return this.mIcon;
}
@Nullable
public Uri getIconUri() {
return this.mIconUri;
}
@Nullable
public String getMediaId() {
return this.mMediaId;
}
@Nullable
public Uri getMediaUri() {
return this.mMediaUri;
}
@Nullable
public CharSequence getSubtitle() {
return this.mSubtitle;
}
@Nullable
public CharSequence getTitle() {
return this.mTitle;
}
public MediaDescriptionCompat(String str, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, Bitmap bitmap, Uri uri, Bundle bundle, Uri uri2) {
this.mMediaId = str;
this.mTitle = charSequence;
this.mSubtitle = charSequence2;
this.mDescription = charSequence3;
this.mIcon = bitmap;
this.mIconUri = uri;
this.mExtras = bundle;
this.mMediaUri = uri2;
}
public MediaDescriptionCompat(Parcel parcel) {
this.mMediaId = parcel.readString();
Parcelable.Creator creator = TextUtils.CHAR_SEQUENCE_CREATOR;
this.mTitle = (CharSequence) creator.createFromParcel(parcel);
this.mSubtitle = (CharSequence) creator.createFromParcel(parcel);
this.mDescription = (CharSequence) creator.createFromParcel(parcel);
ClassLoader classLoader = MediaDescriptionCompat.class.getClassLoader();
this.mIcon = (Bitmap) parcel.readParcelable(classLoader);
this.mIconUri = (Uri) parcel.readParcelable(classLoader);
this.mExtras = parcel.readBundle(classLoader);
this.mMediaUri = (Uri) parcel.readParcelable(classLoader);
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
((MediaDescription) getMediaDescription()).writeToParcel(parcel, i);
}
public String toString() {
return ((Object) this.mTitle) + ", " + ((Object) this.mSubtitle) + ", " + ((Object) this.mDescription);
}
public Object getMediaDescription() {
MediaDescription mediaDescription = this.mDescriptionFwk;
if (mediaDescription != null) {
return mediaDescription;
}
MediaDescription.Builder builder = new MediaDescription.Builder();
builder.setMediaId(this.mMediaId);
builder.setTitle(this.mTitle);
builder.setSubtitle(this.mSubtitle);
builder.setDescription(this.mDescription);
builder.setIconBitmap(this.mIcon);
builder.setIconUri(this.mIconUri);
builder.setExtras(this.mExtras);
builder.setMediaUri(this.mMediaUri);
MediaDescription build = builder.build();
this.mDescriptionFwk = build;
return build;
}
/* JADX WARN: Removed duplicated region for block: B:16:0x0068 */
/* JADX WARN: Removed duplicated region for block: B:20:0x006c */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static android.support.v4.media.MediaDescriptionCompat fromMediaDescription(java.lang.Object r8) {
/*
r0 = 0
if (r8 == 0) goto L79
android.support.v4.media.MediaDescriptionCompat$Builder r1 = new android.support.v4.media.MediaDescriptionCompat$Builder
r1.<init>()
android.media.MediaDescription r8 = (android.media.MediaDescription) r8
java.lang.String r2 = r8.getMediaId()
r1.setMediaId(r2)
java.lang.CharSequence r2 = r8.getTitle()
r1.setTitle(r2)
java.lang.CharSequence r2 = r8.getSubtitle()
r1.setSubtitle(r2)
java.lang.CharSequence r2 = r8.getDescription()
r1.setDescription(r2)
android.graphics.Bitmap r2 = r8.getIconBitmap()
r1.setIconBitmap(r2)
android.net.Uri r2 = r8.getIconUri()
r1.setIconUri(r2)
android.os.Bundle r2 = r8.getExtras()
if (r2 == 0) goto L3e
android.os.Bundle r2 = android.support.v4.media.session.MediaSessionCompat.unparcelWithClassLoader(r2)
L3e:
java.lang.String r3 = "android.support.v4.media.description.MEDIA_URI"
if (r2 == 0) goto L49
android.os.Parcelable r4 = r2.getParcelable(r3)
android.net.Uri r4 = (android.net.Uri) r4
goto L4a
L49:
r4 = r0
L4a:
if (r4 == 0) goto L62
java.lang.String r5 = "android.support.v4.media.description.NULL_BUNDLE_FLAG"
boolean r6 = r2.containsKey(r5)
if (r6 == 0) goto L5c
int r6 = r2.size()
r7 = 2
if (r6 != r7) goto L5c
goto L63
L5c:
r2.remove(r3)
r2.remove(r5)
L62:
r0 = r2
L63:
r1.setExtras(r0)
if (r4 == 0) goto L6c
r1.setMediaUri(r4)
goto L73
L6c:
android.net.Uri r0 = r8.getMediaUri()
r1.setMediaUri(r0)
L73:
android.support.v4.media.MediaDescriptionCompat r0 = r1.build()
r0.mDescriptionFwk = r8
L79:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: android.support.v4.media.MediaDescriptionCompat.fromMediaDescription(java.lang.Object):android.support.v4.media.MediaDescriptionCompat");
}
public static final class Builder {
private CharSequence mDescription;
private Bundle mExtras;
private Bitmap mIcon;
private Uri mIconUri;
private String mMediaId;
private Uri mMediaUri;
private CharSequence mSubtitle;
private CharSequence mTitle;
public Builder setDescription(@Nullable CharSequence charSequence) {
this.mDescription = charSequence;
return this;
}
public Builder setExtras(@Nullable Bundle bundle) {
this.mExtras = bundle;
return this;
}
public Builder setIconBitmap(@Nullable Bitmap bitmap) {
this.mIcon = bitmap;
return this;
}
public Builder setIconUri(@Nullable Uri uri) {
this.mIconUri = uri;
return this;
}
public Builder setMediaId(@Nullable String str) {
this.mMediaId = str;
return this;
}
public Builder setMediaUri(@Nullable Uri uri) {
this.mMediaUri = uri;
return this;
}
public Builder setSubtitle(@Nullable CharSequence charSequence) {
this.mSubtitle = charSequence;
return this;
}
public Builder setTitle(@Nullable CharSequence charSequence) {
this.mTitle = charSequence;
return this;
}
public MediaDescriptionCompat build() {
return new MediaDescriptionCompat(this.mMediaId, this.mTitle, this.mSubtitle, this.mDescription, this.mIcon, this.mIconUri, this.mExtras, this.mMediaUri);
}
}
}

View File

@@ -0,0 +1,378 @@
package android.support.v4.media;
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.media.MediaMetadata;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.media.MediaDescriptionCompat;
import android.support.v4.media.session.MediaSessionCompat;
import android.text.TextUtils;
import android.util.Log;
import androidx.annotation.RestrictTo;
import androidx.collection.ArrayMap;
import java.util.Set;
@SuppressLint({"BanParcelableUsage"})
/* loaded from: classes.dex */
public final class MediaMetadataCompat implements Parcelable {
public static final Parcelable.Creator<MediaMetadataCompat> CREATOR;
static final ArrayMap<String, Integer> METADATA_KEYS_TYPE;
public static final String METADATA_KEY_ADVERTISEMENT = "android.media.metadata.ADVERTISEMENT";
public static final String METADATA_KEY_ALBUM = "android.media.metadata.ALBUM";
public static final String METADATA_KEY_ALBUM_ART = "android.media.metadata.ALBUM_ART";
public static final String METADATA_KEY_ALBUM_ARTIST = "android.media.metadata.ALBUM_ARTIST";
public static final String METADATA_KEY_ALBUM_ART_URI = "android.media.metadata.ALBUM_ART_URI";
public static final String METADATA_KEY_ART = "android.media.metadata.ART";
public static final String METADATA_KEY_ARTIST = "android.media.metadata.ARTIST";
public static final String METADATA_KEY_ART_URI = "android.media.metadata.ART_URI";
public static final String METADATA_KEY_AUTHOR = "android.media.metadata.AUTHOR";
public static final String METADATA_KEY_BT_FOLDER_TYPE = "android.media.metadata.BT_FOLDER_TYPE";
public static final String METADATA_KEY_COMPILATION = "android.media.metadata.COMPILATION";
public static final String METADATA_KEY_COMPOSER = "android.media.metadata.COMPOSER";
public static final String METADATA_KEY_DATE = "android.media.metadata.DATE";
public static final String METADATA_KEY_DISC_NUMBER = "android.media.metadata.DISC_NUMBER";
public static final String METADATA_KEY_DISPLAY_DESCRIPTION = "android.media.metadata.DISPLAY_DESCRIPTION";
public static final String METADATA_KEY_DISPLAY_ICON = "android.media.metadata.DISPLAY_ICON";
public static final String METADATA_KEY_DISPLAY_ICON_URI = "android.media.metadata.DISPLAY_ICON_URI";
public static final String METADATA_KEY_DISPLAY_SUBTITLE = "android.media.metadata.DISPLAY_SUBTITLE";
public static final String METADATA_KEY_DISPLAY_TITLE = "android.media.metadata.DISPLAY_TITLE";
public static final String METADATA_KEY_DOWNLOAD_STATUS = "android.media.metadata.DOWNLOAD_STATUS";
public static final String METADATA_KEY_DURATION = "android.media.metadata.DURATION";
public static final String METADATA_KEY_GENRE = "android.media.metadata.GENRE";
public static final String METADATA_KEY_MEDIA_ID = "android.media.metadata.MEDIA_ID";
public static final String METADATA_KEY_MEDIA_URI = "android.media.metadata.MEDIA_URI";
public static final String METADATA_KEY_NUM_TRACKS = "android.media.metadata.NUM_TRACKS";
public static final String METADATA_KEY_RATING = "android.media.metadata.RATING";
public static final String METADATA_KEY_TITLE = "android.media.metadata.TITLE";
public static final String METADATA_KEY_TRACK_NUMBER = "android.media.metadata.TRACK_NUMBER";
public static final String METADATA_KEY_USER_RATING = "android.media.metadata.USER_RATING";
public static final String METADATA_KEY_WRITER = "android.media.metadata.WRITER";
public static final String METADATA_KEY_YEAR = "android.media.metadata.YEAR";
static final int METADATA_TYPE_BITMAP = 2;
static final int METADATA_TYPE_LONG = 0;
static final int METADATA_TYPE_RATING = 3;
static final int METADATA_TYPE_TEXT = 1;
private static final String[] PREFERRED_BITMAP_ORDER;
private static final String[] PREFERRED_DESCRIPTION_ORDER;
private static final String[] PREFERRED_URI_ORDER;
private static final String TAG = "MediaMetadata";
final Bundle mBundle;
private MediaDescriptionCompat mDescription;
private MediaMetadata mMetadataFwk;
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
static {
ArrayMap<String, Integer> arrayMap = new ArrayMap<>();
METADATA_KEYS_TYPE = arrayMap;
arrayMap.put(METADATA_KEY_TITLE, 1);
arrayMap.put(METADATA_KEY_ARTIST, 1);
arrayMap.put(METADATA_KEY_DURATION, 0);
arrayMap.put(METADATA_KEY_ALBUM, 1);
arrayMap.put(METADATA_KEY_AUTHOR, 1);
arrayMap.put(METADATA_KEY_WRITER, 1);
arrayMap.put(METADATA_KEY_COMPOSER, 1);
arrayMap.put(METADATA_KEY_COMPILATION, 1);
arrayMap.put(METADATA_KEY_DATE, 1);
arrayMap.put(METADATA_KEY_YEAR, 0);
arrayMap.put(METADATA_KEY_GENRE, 1);
arrayMap.put(METADATA_KEY_TRACK_NUMBER, 0);
arrayMap.put(METADATA_KEY_NUM_TRACKS, 0);
arrayMap.put(METADATA_KEY_DISC_NUMBER, 0);
arrayMap.put(METADATA_KEY_ALBUM_ARTIST, 1);
arrayMap.put(METADATA_KEY_ART, 2);
arrayMap.put(METADATA_KEY_ART_URI, 1);
arrayMap.put(METADATA_KEY_ALBUM_ART, 2);
arrayMap.put(METADATA_KEY_ALBUM_ART_URI, 1);
arrayMap.put(METADATA_KEY_USER_RATING, 3);
arrayMap.put(METADATA_KEY_RATING, 3);
arrayMap.put(METADATA_KEY_DISPLAY_TITLE, 1);
arrayMap.put(METADATA_KEY_DISPLAY_SUBTITLE, 1);
arrayMap.put(METADATA_KEY_DISPLAY_DESCRIPTION, 1);
arrayMap.put(METADATA_KEY_DISPLAY_ICON, 2);
arrayMap.put(METADATA_KEY_DISPLAY_ICON_URI, 1);
arrayMap.put(METADATA_KEY_MEDIA_ID, 1);
arrayMap.put(METADATA_KEY_BT_FOLDER_TYPE, 0);
arrayMap.put(METADATA_KEY_MEDIA_URI, 1);
arrayMap.put("android.media.metadata.ADVERTISEMENT", 0);
arrayMap.put(METADATA_KEY_DOWNLOAD_STATUS, 0);
PREFERRED_DESCRIPTION_ORDER = new String[]{METADATA_KEY_TITLE, METADATA_KEY_ARTIST, METADATA_KEY_ALBUM, METADATA_KEY_ALBUM_ARTIST, METADATA_KEY_WRITER, METADATA_KEY_AUTHOR, METADATA_KEY_COMPOSER};
PREFERRED_BITMAP_ORDER = new String[]{METADATA_KEY_DISPLAY_ICON, METADATA_KEY_ART, METADATA_KEY_ALBUM_ART};
PREFERRED_URI_ORDER = new String[]{METADATA_KEY_DISPLAY_ICON_URI, METADATA_KEY_ART_URI, METADATA_KEY_ALBUM_ART_URI};
CREATOR = new Parcelable.Creator<MediaMetadataCompat>() { // from class: android.support.v4.media.MediaMetadataCompat.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public MediaMetadataCompat createFromParcel(Parcel parcel) {
return new MediaMetadataCompat(parcel);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public MediaMetadataCompat[] newArray(int i) {
return new MediaMetadataCompat[i];
}
};
}
public MediaMetadataCompat(Bundle bundle) {
Bundle bundle2 = new Bundle(bundle);
this.mBundle = bundle2;
MediaSessionCompat.ensureClassLoader(bundle2);
}
public MediaMetadataCompat(Parcel parcel) {
this.mBundle = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
}
public boolean containsKey(String str) {
return this.mBundle.containsKey(str);
}
public CharSequence getText(String str) {
return this.mBundle.getCharSequence(str);
}
public String getString(String str) {
CharSequence charSequence = this.mBundle.getCharSequence(str);
if (charSequence != null) {
return charSequence.toString();
}
return null;
}
public long getLong(String str) {
return this.mBundle.getLong(str, 0L);
}
public RatingCompat getRating(String str) {
try {
return RatingCompat.fromRating(this.mBundle.getParcelable(str));
} catch (Exception e) {
Log.w(TAG, "Failed to retrieve a key as Rating.", e);
return null;
}
}
public Bitmap getBitmap(String str) {
try {
return (Bitmap) this.mBundle.getParcelable(str);
} catch (Exception e) {
Log.w(TAG, "Failed to retrieve a key as Bitmap.", e);
return null;
}
}
public MediaDescriptionCompat getDescription() {
Bitmap bitmap;
Uri uri;
MediaDescriptionCompat mediaDescriptionCompat = this.mDescription;
if (mediaDescriptionCompat != null) {
return mediaDescriptionCompat;
}
String string = getString(METADATA_KEY_MEDIA_ID);
CharSequence[] charSequenceArr = new CharSequence[3];
CharSequence text = getText(METADATA_KEY_DISPLAY_TITLE);
if (TextUtils.isEmpty(text)) {
int i = 0;
int i2 = 0;
while (i < 3) {
String[] strArr = PREFERRED_DESCRIPTION_ORDER;
if (i2 >= strArr.length) {
break;
}
int i3 = i2 + 1;
CharSequence text2 = getText(strArr[i2]);
if (!TextUtils.isEmpty(text2)) {
charSequenceArr[i] = text2;
i++;
}
i2 = i3;
}
} else {
charSequenceArr[0] = text;
charSequenceArr[1] = getText(METADATA_KEY_DISPLAY_SUBTITLE);
charSequenceArr[2] = getText(METADATA_KEY_DISPLAY_DESCRIPTION);
}
int i4 = 0;
while (true) {
String[] strArr2 = PREFERRED_BITMAP_ORDER;
if (i4 >= strArr2.length) {
bitmap = null;
break;
}
bitmap = getBitmap(strArr2[i4]);
if (bitmap != null) {
break;
}
i4++;
}
int i5 = 0;
while (true) {
String[] strArr3 = PREFERRED_URI_ORDER;
if (i5 >= strArr3.length) {
uri = null;
break;
}
String string2 = getString(strArr3[i5]);
if (!TextUtils.isEmpty(string2)) {
uri = Uri.parse(string2);
break;
}
i5++;
}
String string3 = getString(METADATA_KEY_MEDIA_URI);
Uri parse = TextUtils.isEmpty(string3) ? null : Uri.parse(string3);
MediaDescriptionCompat.Builder builder = new MediaDescriptionCompat.Builder();
builder.setMediaId(string);
builder.setTitle(charSequenceArr[0]);
builder.setSubtitle(charSequenceArr[1]);
builder.setDescription(charSequenceArr[2]);
builder.setIconBitmap(bitmap);
builder.setIconUri(uri);
builder.setMediaUri(parse);
Bundle bundle = new Bundle();
if (this.mBundle.containsKey(METADATA_KEY_BT_FOLDER_TYPE)) {
bundle.putLong(MediaDescriptionCompat.EXTRA_BT_FOLDER_TYPE, getLong(METADATA_KEY_BT_FOLDER_TYPE));
}
if (this.mBundle.containsKey(METADATA_KEY_DOWNLOAD_STATUS)) {
bundle.putLong(MediaDescriptionCompat.EXTRA_DOWNLOAD_STATUS, getLong(METADATA_KEY_DOWNLOAD_STATUS));
}
if (!bundle.isEmpty()) {
builder.setExtras(bundle);
}
MediaDescriptionCompat build = builder.build();
this.mDescription = build;
return build;
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeBundle(this.mBundle);
}
public int size() {
return this.mBundle.size();
}
public Set<String> keySet() {
return this.mBundle.keySet();
}
public Bundle getBundle() {
return new Bundle(this.mBundle);
}
public static MediaMetadataCompat fromMediaMetadata(Object obj) {
if (obj == null) {
return null;
}
Parcel obtain = Parcel.obtain();
MediaMetadata mediaMetadata = (MediaMetadata) obj;
mediaMetadata.writeToParcel(obtain, 0);
obtain.setDataPosition(0);
MediaMetadataCompat createFromParcel = CREATOR.createFromParcel(obtain);
obtain.recycle();
createFromParcel.mMetadataFwk = mediaMetadata;
return createFromParcel;
}
public Object getMediaMetadata() {
if (this.mMetadataFwk == null) {
Parcel obtain = Parcel.obtain();
writeToParcel(obtain, 0);
obtain.setDataPosition(0);
this.mMetadataFwk = (MediaMetadata) MediaMetadata.CREATOR.createFromParcel(obtain);
obtain.recycle();
}
return this.mMetadataFwk;
}
public static final class Builder {
private final Bundle mBundle;
public Builder() {
this.mBundle = new Bundle();
}
public Builder(MediaMetadataCompat mediaMetadataCompat) {
Bundle bundle = new Bundle(mediaMetadataCompat.mBundle);
this.mBundle = bundle;
MediaSessionCompat.ensureClassLoader(bundle);
}
@RestrictTo({RestrictTo.Scope.LIBRARY})
public Builder(MediaMetadataCompat mediaMetadataCompat, int i) {
this(mediaMetadataCompat);
for (String str : this.mBundle.keySet()) {
Object obj = this.mBundle.get(str);
if (obj instanceof Bitmap) {
Bitmap bitmap = (Bitmap) obj;
if (bitmap.getHeight() > i || bitmap.getWidth() > i) {
putBitmap(str, scaleBitmap(bitmap, i));
}
}
}
}
public Builder putText(String str, CharSequence charSequence) {
ArrayMap<String, Integer> arrayMap = MediaMetadataCompat.METADATA_KEYS_TYPE;
if (arrayMap.containsKey(str) && arrayMap.get(str).intValue() != 1) {
throw new IllegalArgumentException("The " + str + " key cannot be used to put a CharSequence");
}
this.mBundle.putCharSequence(str, charSequence);
return this;
}
public Builder putString(String str, String str2) {
ArrayMap<String, Integer> arrayMap = MediaMetadataCompat.METADATA_KEYS_TYPE;
if (arrayMap.containsKey(str) && arrayMap.get(str).intValue() != 1) {
throw new IllegalArgumentException("The " + str + " key cannot be used to put a String");
}
this.mBundle.putCharSequence(str, str2);
return this;
}
public Builder putLong(String str, long j) {
ArrayMap<String, Integer> arrayMap = MediaMetadataCompat.METADATA_KEYS_TYPE;
if (arrayMap.containsKey(str) && arrayMap.get(str).intValue() != 0) {
throw new IllegalArgumentException("The " + str + " key cannot be used to put a long");
}
this.mBundle.putLong(str, j);
return this;
}
public Builder putRating(String str, RatingCompat ratingCompat) {
ArrayMap<String, Integer> arrayMap = MediaMetadataCompat.METADATA_KEYS_TYPE;
if (arrayMap.containsKey(str) && arrayMap.get(str).intValue() != 3) {
throw new IllegalArgumentException("The " + str + " key cannot be used to put a Rating");
}
this.mBundle.putParcelable(str, (Parcelable) ratingCompat.getRating());
return this;
}
public Builder putBitmap(String str, Bitmap bitmap) {
ArrayMap<String, Integer> arrayMap = MediaMetadataCompat.METADATA_KEYS_TYPE;
if (arrayMap.containsKey(str) && arrayMap.get(str).intValue() != 2) {
throw new IllegalArgumentException("The " + str + " key cannot be used to put a Bitmap");
}
this.mBundle.putParcelable(str, bitmap);
return this;
}
public MediaMetadataCompat build() {
return new MediaMetadataCompat(this.mBundle);
}
private Bitmap scaleBitmap(Bitmap bitmap, int i) {
float f = i;
float min = Math.min(f / bitmap.getWidth(), f / bitmap.getHeight());
return Bitmap.createScaledBitmap(bitmap, (int) (bitmap.getWidth() * min), (int) (bitmap.getHeight() * min), true);
}
}
}

View File

@@ -0,0 +1,218 @@
package android.support.v4.media;
import android.annotation.SuppressLint;
import android.media.Rating;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import androidx.annotation.RestrictTo;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@SuppressLint({"BanParcelableUsage"})
/* loaded from: classes.dex */
public final class RatingCompat implements Parcelable {
public static final Parcelable.Creator<RatingCompat> CREATOR = new Parcelable.Creator<RatingCompat>() { // from class: android.support.v4.media.RatingCompat.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public RatingCompat createFromParcel(Parcel parcel) {
return new RatingCompat(parcel.readInt(), parcel.readFloat());
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public RatingCompat[] newArray(int i) {
return new RatingCompat[i];
}
};
public static final int RATING_3_STARS = 3;
public static final int RATING_4_STARS = 4;
public static final int RATING_5_STARS = 5;
public static final int RATING_HEART = 1;
public static final int RATING_NONE = 0;
private static final float RATING_NOT_RATED = -1.0f;
public static final int RATING_PERCENTAGE = 6;
public static final int RATING_THUMB_UP_DOWN = 2;
private static final String TAG = "Rating";
private Object mRatingObj;
private final int mRatingStyle;
private final float mRatingValue;
@Retention(RetentionPolicy.SOURCE)
@RestrictTo({RestrictTo.Scope.LIBRARY})
public @interface StarStyle {
}
@Retention(RetentionPolicy.SOURCE)
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public @interface Style {
}
@Override // android.os.Parcelable
public int describeContents() {
return this.mRatingStyle;
}
public int getRatingStyle() {
return this.mRatingStyle;
}
public boolean hasHeart() {
return this.mRatingStyle == 1 && this.mRatingValue == 1.0f;
}
public boolean isRated() {
return this.mRatingValue >= 0.0f;
}
public boolean isThumbUp() {
return this.mRatingStyle == 2 && this.mRatingValue == 1.0f;
}
public RatingCompat(int i, float f) {
this.mRatingStyle = i;
this.mRatingValue = f;
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Rating:style=");
sb.append(this.mRatingStyle);
sb.append(" rating=");
float f = this.mRatingValue;
sb.append(f < 0.0f ? "unrated" : String.valueOf(f));
return sb.toString();
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(this.mRatingStyle);
parcel.writeFloat(this.mRatingValue);
}
public static RatingCompat newUnratedRating(int i) {
switch (i) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
return new RatingCompat(i, -1.0f);
default:
return null;
}
}
public static RatingCompat newHeartRating(boolean z) {
return new RatingCompat(1, z ? 1.0f : 0.0f);
}
public static RatingCompat newThumbRating(boolean z) {
return new RatingCompat(2, z ? 1.0f : 0.0f);
}
public static RatingCompat newStarRating(int i, float f) {
float f2;
if (i == 3) {
f2 = 3.0f;
} else if (i == 4) {
f2 = 4.0f;
} else {
if (i != 5) {
Log.e(TAG, "Invalid rating style (" + i + ") for a star rating");
return null;
}
f2 = 5.0f;
}
if (f < 0.0f || f > f2) {
Log.e(TAG, "Trying to set out of range star-based rating");
return null;
}
return new RatingCompat(i, f);
}
public static RatingCompat newPercentageRating(float f) {
if (f < 0.0f || f > 100.0f) {
Log.e(TAG, "Invalid percentage-based rating value");
return null;
}
return new RatingCompat(6, f);
}
public float getStarRating() {
int i = this.mRatingStyle;
if ((i == 3 || i == 4 || i == 5) && isRated()) {
return this.mRatingValue;
}
return -1.0f;
}
public float getPercentRating() {
if (this.mRatingStyle == 6 && isRated()) {
return this.mRatingValue;
}
return -1.0f;
}
public static RatingCompat fromRating(Object obj) {
RatingCompat ratingCompat = null;
if (obj != null) {
Rating rating = (Rating) obj;
int ratingStyle = rating.getRatingStyle();
if (rating.isRated()) {
switch (ratingStyle) {
case 1:
ratingCompat = newHeartRating(rating.hasHeart());
break;
case 2:
ratingCompat = newThumbRating(rating.isThumbUp());
break;
case 3:
case 4:
case 5:
ratingCompat = newStarRating(ratingStyle, rating.getStarRating());
break;
case 6:
ratingCompat = newPercentageRating(rating.getPercentRating());
break;
default:
return null;
}
} else {
ratingCompat = newUnratedRating(ratingStyle);
}
ratingCompat.mRatingObj = obj;
}
return ratingCompat;
}
public Object getRating() {
if (this.mRatingObj == null) {
if (isRated()) {
int i = this.mRatingStyle;
switch (i) {
case 1:
this.mRatingObj = Rating.newHeartRating(hasHeart());
break;
case 2:
this.mRatingObj = Rating.newThumbRating(isThumbUp());
break;
case 3:
case 4:
case 5:
this.mRatingObj = Rating.newStarRating(i, getStarRating());
break;
case 6:
this.mRatingObj = Rating.newPercentageRating(getPercentRating());
break;
default:
return null;
}
} else {
this.mRatingObj = Rating.newUnratedRating(this.mRatingStyle);
}
}
return this.mRatingObj;
}
}

View File

@@ -0,0 +1,477 @@
package android.support.v4.media.session;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import android.support.v4.media.MediaMetadataCompat;
import android.support.v4.media.session.MediaSessionCompat;
import android.text.TextUtils;
import java.util.List;
/* loaded from: classes.dex */
public interface IMediaControllerCallback extends IInterface {
public static class Default implements IMediaControllerCallback {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onCaptioningEnabledChanged(boolean z) throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onEvent(String str, Bundle bundle) throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onExtrasChanged(Bundle bundle) throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onMetadataChanged(MediaMetadataCompat mediaMetadataCompat) throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onPlaybackStateChanged(PlaybackStateCompat playbackStateCompat) throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onQueueChanged(List<MediaSessionCompat.QueueItem> list) throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onQueueTitleChanged(CharSequence charSequence) throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onRepeatModeChanged(int i) throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onSessionDestroyed() throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onSessionReady() throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onShuffleModeChanged(int i) throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onShuffleModeChangedRemoved(boolean z) throws RemoteException {
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onVolumeInfoChanged(ParcelableVolumeInfo parcelableVolumeInfo) throws RemoteException {
}
}
void onCaptioningEnabledChanged(boolean z) throws RemoteException;
void onEvent(String str, Bundle bundle) throws RemoteException;
void onExtrasChanged(Bundle bundle) throws RemoteException;
void onMetadataChanged(MediaMetadataCompat mediaMetadataCompat) throws RemoteException;
void onPlaybackStateChanged(PlaybackStateCompat playbackStateCompat) throws RemoteException;
void onQueueChanged(List<MediaSessionCompat.QueueItem> list) throws RemoteException;
void onQueueTitleChanged(CharSequence charSequence) throws RemoteException;
void onRepeatModeChanged(int i) throws RemoteException;
void onSessionDestroyed() throws RemoteException;
void onSessionReady() throws RemoteException;
void onShuffleModeChanged(int i) throws RemoteException;
void onShuffleModeChangedRemoved(boolean z) throws RemoteException;
void onVolumeInfoChanged(ParcelableVolumeInfo parcelableVolumeInfo) throws RemoteException;
public static abstract class Stub extends Binder implements IMediaControllerCallback {
private static final String DESCRIPTOR = "android.support.v4.media.session.IMediaControllerCallback";
static final int TRANSACTION_onCaptioningEnabledChanged = 11;
static final int TRANSACTION_onEvent = 1;
static final int TRANSACTION_onExtrasChanged = 7;
static final int TRANSACTION_onMetadataChanged = 4;
static final int TRANSACTION_onPlaybackStateChanged = 3;
static final int TRANSACTION_onQueueChanged = 5;
static final int TRANSACTION_onQueueTitleChanged = 6;
static final int TRANSACTION_onRepeatModeChanged = 9;
static final int TRANSACTION_onSessionDestroyed = 2;
static final int TRANSACTION_onSessionReady = 13;
static final int TRANSACTION_onShuffleModeChanged = 12;
static final int TRANSACTION_onShuffleModeChangedRemoved = 10;
static final int TRANSACTION_onVolumeInfoChanged = 8;
public static IMediaControllerCallback getDefaultImpl() {
return Proxy.sDefaultImpl;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, DESCRIPTOR);
}
public static IMediaControllerCallback asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof IMediaControllerCallback)) {
return (IMediaControllerCallback) queryLocalInterface;
}
return new Proxy(iBinder);
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
if (i == 1598968902) {
parcel2.writeString(DESCRIPTOR);
return true;
}
switch (i) {
case 1:
parcel.enforceInterface(DESCRIPTOR);
onEvent(parcel.readString(), parcel.readInt() != 0 ? (Bundle) Bundle.CREATOR.createFromParcel(parcel) : null);
return true;
case 2:
parcel.enforceInterface(DESCRIPTOR);
onSessionDestroyed();
return true;
case 3:
parcel.enforceInterface(DESCRIPTOR);
onPlaybackStateChanged(parcel.readInt() != 0 ? PlaybackStateCompat.CREATOR.createFromParcel(parcel) : null);
return true;
case 4:
parcel.enforceInterface(DESCRIPTOR);
onMetadataChanged(parcel.readInt() != 0 ? MediaMetadataCompat.CREATOR.createFromParcel(parcel) : null);
return true;
case 5:
parcel.enforceInterface(DESCRIPTOR);
onQueueChanged(parcel.createTypedArrayList(MediaSessionCompat.QueueItem.CREATOR));
return true;
case 6:
parcel.enforceInterface(DESCRIPTOR);
onQueueTitleChanged(parcel.readInt() != 0 ? (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel) : null);
return true;
case 7:
parcel.enforceInterface(DESCRIPTOR);
onExtrasChanged(parcel.readInt() != 0 ? (Bundle) Bundle.CREATOR.createFromParcel(parcel) : null);
return true;
case 8:
parcel.enforceInterface(DESCRIPTOR);
onVolumeInfoChanged(parcel.readInt() != 0 ? ParcelableVolumeInfo.CREATOR.createFromParcel(parcel) : null);
return true;
case 9:
parcel.enforceInterface(DESCRIPTOR);
onRepeatModeChanged(parcel.readInt());
return true;
case 10:
parcel.enforceInterface(DESCRIPTOR);
onShuffleModeChangedRemoved(parcel.readInt() != 0);
return true;
case 11:
parcel.enforceInterface(DESCRIPTOR);
onCaptioningEnabledChanged(parcel.readInt() != 0);
return true;
case 12:
parcel.enforceInterface(DESCRIPTOR);
onShuffleModeChanged(parcel.readInt());
return true;
case 13:
parcel.enforceInterface(DESCRIPTOR);
onSessionReady();
return true;
default:
return super.onTransact(i, parcel, parcel2, i2);
}
}
public static class Proxy implements IMediaControllerCallback {
public static IMediaControllerCallback sDefaultImpl;
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return Stub.DESCRIPTOR;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onEvent(String str, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeString(str);
if (bundle != null) {
obtain.writeInt(1);
bundle.writeToParcel(obtain, 0);
} else {
obtain.writeInt(0);
}
if (this.mRemote.transact(1, obtain, null, 1) || Stub.getDefaultImpl() == null) {
obtain.recycle();
} else {
Stub.getDefaultImpl().onEvent(str, bundle);
obtain.recycle();
}
} catch (Throwable th) {
obtain.recycle();
throw th;
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onSessionDestroyed() throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
if (this.mRemote.transact(2, obtain, null, 1) || Stub.getDefaultImpl() == null) {
return;
}
Stub.getDefaultImpl().onSessionDestroyed();
} finally {
obtain.recycle();
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onPlaybackStateChanged(PlaybackStateCompat playbackStateCompat) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
if (playbackStateCompat != null) {
obtain.writeInt(1);
playbackStateCompat.writeToParcel(obtain, 0);
} else {
obtain.writeInt(0);
}
if (this.mRemote.transact(3, obtain, null, 1) || Stub.getDefaultImpl() == null) {
obtain.recycle();
} else {
Stub.getDefaultImpl().onPlaybackStateChanged(playbackStateCompat);
obtain.recycle();
}
} catch (Throwable th) {
obtain.recycle();
throw th;
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onMetadataChanged(MediaMetadataCompat mediaMetadataCompat) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
if (mediaMetadataCompat != null) {
obtain.writeInt(1);
mediaMetadataCompat.writeToParcel(obtain, 0);
} else {
obtain.writeInt(0);
}
if (this.mRemote.transact(4, obtain, null, 1) || Stub.getDefaultImpl() == null) {
obtain.recycle();
} else {
Stub.getDefaultImpl().onMetadataChanged(mediaMetadataCompat);
obtain.recycle();
}
} catch (Throwable th) {
obtain.recycle();
throw th;
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onQueueChanged(List<MediaSessionCompat.QueueItem> list) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeTypedList(list);
if (this.mRemote.transact(5, obtain, null, 1) || Stub.getDefaultImpl() == null) {
return;
}
Stub.getDefaultImpl().onQueueChanged(list);
} finally {
obtain.recycle();
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onQueueTitleChanged(CharSequence charSequence) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
if (charSequence != null) {
obtain.writeInt(1);
TextUtils.writeToParcel(charSequence, obtain, 0);
} else {
obtain.writeInt(0);
}
if (this.mRemote.transact(6, obtain, null, 1) || Stub.getDefaultImpl() == null) {
obtain.recycle();
} else {
Stub.getDefaultImpl().onQueueTitleChanged(charSequence);
obtain.recycle();
}
} catch (Throwable th) {
obtain.recycle();
throw th;
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onExtrasChanged(Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
if (bundle != null) {
obtain.writeInt(1);
bundle.writeToParcel(obtain, 0);
} else {
obtain.writeInt(0);
}
if (this.mRemote.transact(7, obtain, null, 1) || Stub.getDefaultImpl() == null) {
obtain.recycle();
} else {
Stub.getDefaultImpl().onExtrasChanged(bundle);
obtain.recycle();
}
} catch (Throwable th) {
obtain.recycle();
throw th;
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onVolumeInfoChanged(ParcelableVolumeInfo parcelableVolumeInfo) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
if (parcelableVolumeInfo != null) {
obtain.writeInt(1);
parcelableVolumeInfo.writeToParcel(obtain, 0);
} else {
obtain.writeInt(0);
}
if (this.mRemote.transact(8, obtain, null, 1) || Stub.getDefaultImpl() == null) {
obtain.recycle();
} else {
Stub.getDefaultImpl().onVolumeInfoChanged(parcelableVolumeInfo);
obtain.recycle();
}
} catch (Throwable th) {
obtain.recycle();
throw th;
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onRepeatModeChanged(int i) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeInt(i);
if (this.mRemote.transact(9, obtain, null, 1) || Stub.getDefaultImpl() == null) {
return;
}
Stub.getDefaultImpl().onRepeatModeChanged(i);
} finally {
obtain.recycle();
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onShuffleModeChangedRemoved(boolean z) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeInt(z ? 1 : 0);
if (this.mRemote.transact(10, obtain, null, 1) || Stub.getDefaultImpl() == null) {
return;
}
Stub.getDefaultImpl().onShuffleModeChangedRemoved(z);
} finally {
obtain.recycle();
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onCaptioningEnabledChanged(boolean z) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeInt(z ? 1 : 0);
if (this.mRemote.transact(11, obtain, null, 1) || Stub.getDefaultImpl() == null) {
return;
}
Stub.getDefaultImpl().onCaptioningEnabledChanged(z);
} finally {
obtain.recycle();
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onShuffleModeChanged(int i) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeInt(i);
if (this.mRemote.transact(12, obtain, null, 1) || Stub.getDefaultImpl() == null) {
return;
}
Stub.getDefaultImpl().onShuffleModeChanged(i);
} finally {
obtain.recycle();
}
}
@Override // android.support.v4.media.session.IMediaControllerCallback
public void onSessionReady() throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
if (this.mRemote.transact(13, obtain, null, 1) || Stub.getDefaultImpl() == null) {
return;
}
Stub.getDefaultImpl().onSessionReady();
} finally {
obtain.recycle();
}
}
}
public static boolean setDefaultImpl(IMediaControllerCallback iMediaControllerCallback) {
if (Proxy.sDefaultImpl != null) {
throw new IllegalStateException("setDefaultImpl() called twice");
}
if (iMediaControllerCallback == null) {
return false;
}
Proxy.sDefaultImpl = iMediaControllerCallback;
return true;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
package android.support.v4.media.session;
/* loaded from: classes.dex */
public abstract /* synthetic */ class MediaControllerCompat$MediaControllerImplApi21$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,5 @@
package android.support.v4.media.session;
/* loaded from: classes.dex */
public abstract /* synthetic */ class MediaControllerCompat$TransportControlsApi21$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,12 @@
package android.support.v4.media.session;
import android.content.Context;
import android.media.session.MediaSession;
import android.os.Bundle;
/* loaded from: classes.dex */
public abstract /* synthetic */ class MediaSessionCompat$$ExternalSyntheticApiModelOutline0 {
public static /* synthetic */ MediaSession m(Context context, String str, Bundle bundle) {
return new MediaSession(context, str, bundle);
}
}

View File

@@ -0,0 +1,5 @@
package android.support.v4.media.session;
/* loaded from: classes.dex */
public abstract /* synthetic */ class MediaSessionCompat$MediaSessionImplApi28$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,58 @@
package android.support.v4.media.session;
import android.annotation.SuppressLint;
import android.os.Parcel;
import android.os.Parcelable;
@SuppressLint({"BanParcelableUsage"})
/* loaded from: classes.dex */
public class ParcelableVolumeInfo implements Parcelable {
public static final Parcelable.Creator<ParcelableVolumeInfo> CREATOR = new Parcelable.Creator<ParcelableVolumeInfo>() { // from class: android.support.v4.media.session.ParcelableVolumeInfo.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public ParcelableVolumeInfo createFromParcel(Parcel parcel) {
return new ParcelableVolumeInfo(parcel);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public ParcelableVolumeInfo[] newArray(int i) {
return new ParcelableVolumeInfo[i];
}
};
public int audioStream;
public int controlType;
public int currentVolume;
public int maxVolume;
public int volumeType;
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public ParcelableVolumeInfo(int i, int i2, int i3, int i4, int i5) {
this.volumeType = i;
this.audioStream = i2;
this.controlType = i3;
this.maxVolume = i4;
this.currentVolume = i5;
}
public ParcelableVolumeInfo(Parcel parcel) {
this.volumeType = parcel.readInt();
this.controlType = parcel.readInt();
this.maxVolume = parcel.readInt();
this.currentVolume = parcel.readInt();
this.audioStream = parcel.readInt();
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(this.volumeType);
parcel.writeInt(this.controlType);
parcel.writeInt(this.maxVolume);
parcel.writeInt(this.currentVolume);
parcel.writeInt(this.audioStream);
}
}

View File

@@ -0,0 +1,518 @@
package android.support.v4.media.session;
import android.annotation.SuppressLint;
import android.media.session.PlaybackState;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@SuppressLint({"BanParcelableUsage"})
/* loaded from: classes.dex */
public final class PlaybackStateCompat implements Parcelable {
public static final long ACTION_FAST_FORWARD = 64;
public static final long ACTION_PAUSE = 2;
public static final long ACTION_PLAY = 4;
public static final long ACTION_PLAY_FROM_MEDIA_ID = 1024;
public static final long ACTION_PLAY_FROM_SEARCH = 2048;
public static final long ACTION_PLAY_FROM_URI = 8192;
public static final long ACTION_PLAY_PAUSE = 512;
public static final long ACTION_PREPARE = 16384;
public static final long ACTION_PREPARE_FROM_MEDIA_ID = 32768;
public static final long ACTION_PREPARE_FROM_SEARCH = 65536;
public static final long ACTION_PREPARE_FROM_URI = 131072;
public static final long ACTION_REWIND = 8;
public static final long ACTION_SEEK_TO = 256;
public static final long ACTION_SET_CAPTIONING_ENABLED = 1048576;
public static final long ACTION_SET_PLAYBACK_SPEED = 4194304;
public static final long ACTION_SET_RATING = 128;
public static final long ACTION_SET_REPEAT_MODE = 262144;
public static final long ACTION_SET_SHUFFLE_MODE = 2097152;
@Deprecated
public static final long ACTION_SET_SHUFFLE_MODE_ENABLED = 524288;
public static final long ACTION_SKIP_TO_NEXT = 32;
public static final long ACTION_SKIP_TO_PREVIOUS = 16;
public static final long ACTION_SKIP_TO_QUEUE_ITEM = 4096;
public static final long ACTION_STOP = 1;
public static final Parcelable.Creator<PlaybackStateCompat> CREATOR = new Parcelable.Creator<PlaybackStateCompat>() { // from class: android.support.v4.media.session.PlaybackStateCompat.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public PlaybackStateCompat createFromParcel(Parcel parcel) {
return new PlaybackStateCompat(parcel);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public PlaybackStateCompat[] newArray(int i) {
return new PlaybackStateCompat[i];
}
};
public static final int ERROR_CODE_ACTION_ABORTED = 10;
public static final int ERROR_CODE_APP_ERROR = 1;
public static final int ERROR_CODE_AUTHENTICATION_EXPIRED = 3;
public static final int ERROR_CODE_CONCURRENT_STREAM_LIMIT = 5;
public static final int ERROR_CODE_CONTENT_ALREADY_PLAYING = 8;
public static final int ERROR_CODE_END_OF_QUEUE = 11;
public static final int ERROR_CODE_NOT_AVAILABLE_IN_REGION = 7;
public static final int ERROR_CODE_NOT_SUPPORTED = 2;
public static final int ERROR_CODE_PARENTAL_CONTROL_RESTRICTED = 6;
public static final int ERROR_CODE_PREMIUM_ACCOUNT_REQUIRED = 4;
public static final int ERROR_CODE_SKIP_LIMIT_REACHED = 9;
public static final int ERROR_CODE_UNKNOWN_ERROR = 0;
private static final int KEYCODE_MEDIA_PAUSE = 127;
private static final int KEYCODE_MEDIA_PLAY = 126;
public static final long PLAYBACK_POSITION_UNKNOWN = -1;
public static final int REPEAT_MODE_ALL = 2;
public static final int REPEAT_MODE_GROUP = 3;
public static final int REPEAT_MODE_INVALID = -1;
public static final int REPEAT_MODE_NONE = 0;
public static final int REPEAT_MODE_ONE = 1;
public static final int SHUFFLE_MODE_ALL = 1;
public static final int SHUFFLE_MODE_GROUP = 2;
public static final int SHUFFLE_MODE_INVALID = -1;
public static final int SHUFFLE_MODE_NONE = 0;
public static final int STATE_BUFFERING = 6;
public static final int STATE_CONNECTING = 8;
public static final int STATE_ERROR = 7;
public static final int STATE_FAST_FORWARDING = 4;
public static final int STATE_NONE = 0;
public static final int STATE_PAUSED = 2;
public static final int STATE_PLAYING = 3;
public static final int STATE_REWINDING = 5;
public static final int STATE_SKIPPING_TO_NEXT = 10;
public static final int STATE_SKIPPING_TO_PREVIOUS = 9;
public static final int STATE_SKIPPING_TO_QUEUE_ITEM = 11;
public static final int STATE_STOPPED = 1;
final long mActions;
final long mActiveItemId;
final long mBufferedPosition;
List<CustomAction> mCustomActions;
final int mErrorCode;
final CharSequence mErrorMessage;
final Bundle mExtras;
final long mPosition;
final float mSpeed;
final int mState;
private PlaybackState mStateFwk;
final long mUpdateTime;
@Retention(RetentionPolicy.SOURCE)
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public @interface Actions {
}
@Retention(RetentionPolicy.SOURCE)
@RestrictTo({RestrictTo.Scope.LIBRARY})
public @interface MediaKeyAction {
}
@Retention(RetentionPolicy.SOURCE)
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public @interface RepeatMode {
}
@Retention(RetentionPolicy.SOURCE)
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public @interface ShuffleMode {
}
@Retention(RetentionPolicy.SOURCE)
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public @interface State {
}
public static int toKeyCode(long j) {
if (j == 4) {
return 126;
}
if (j == 2) {
return 127;
}
if (j == 32) {
return 87;
}
if (j == 16) {
return 88;
}
if (j == 1) {
return 86;
}
if (j == 64) {
return 90;
}
if (j == 8) {
return 89;
}
return j == 512 ? 85 : 0;
}
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public long getActions() {
return this.mActions;
}
public long getActiveQueueItemId() {
return this.mActiveItemId;
}
public long getBufferedPosition() {
return this.mBufferedPosition;
}
public List<CustomAction> getCustomActions() {
return this.mCustomActions;
}
public int getErrorCode() {
return this.mErrorCode;
}
public CharSequence getErrorMessage() {
return this.mErrorMessage;
}
@Nullable
public Bundle getExtras() {
return this.mExtras;
}
public long getLastPositionUpdateTime() {
return this.mUpdateTime;
}
public float getPlaybackSpeed() {
return this.mSpeed;
}
public long getPosition() {
return this.mPosition;
}
public int getState() {
return this.mState;
}
public PlaybackStateCompat(int i, long j, long j2, float f, long j3, int i2, CharSequence charSequence, long j4, List<CustomAction> list, long j5, Bundle bundle) {
this.mState = i;
this.mPosition = j;
this.mBufferedPosition = j2;
this.mSpeed = f;
this.mActions = j3;
this.mErrorCode = i2;
this.mErrorMessage = charSequence;
this.mUpdateTime = j4;
this.mCustomActions = new ArrayList(list);
this.mActiveItemId = j5;
this.mExtras = bundle;
}
public PlaybackStateCompat(Parcel parcel) {
this.mState = parcel.readInt();
this.mPosition = parcel.readLong();
this.mSpeed = parcel.readFloat();
this.mUpdateTime = parcel.readLong();
this.mBufferedPosition = parcel.readLong();
this.mActions = parcel.readLong();
this.mErrorMessage = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
this.mCustomActions = parcel.createTypedArrayList(CustomAction.CREATOR);
this.mActiveItemId = parcel.readLong();
this.mExtras = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
this.mErrorCode = parcel.readInt();
}
public String toString() {
return "PlaybackState {state=" + this.mState + ", position=" + this.mPosition + ", buffered position=" + this.mBufferedPosition + ", speed=" + this.mSpeed + ", updated=" + this.mUpdateTime + ", actions=" + this.mActions + ", error code=" + this.mErrorCode + ", error message=" + this.mErrorMessage + ", custom actions=" + this.mCustomActions + ", active item id=" + this.mActiveItemId + "}";
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(this.mState);
parcel.writeLong(this.mPosition);
parcel.writeFloat(this.mSpeed);
parcel.writeLong(this.mUpdateTime);
parcel.writeLong(this.mBufferedPosition);
parcel.writeLong(this.mActions);
TextUtils.writeToParcel(this.mErrorMessage, parcel, i);
parcel.writeTypedList(this.mCustomActions);
parcel.writeLong(this.mActiveItemId);
parcel.writeBundle(this.mExtras);
parcel.writeInt(this.mErrorCode);
}
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public long getCurrentPosition(Long l) {
return Math.max(0L, this.mPosition + ((long) (this.mSpeed * (l != null ? l.longValue() : SystemClock.elapsedRealtime() - this.mUpdateTime))));
}
public static PlaybackStateCompat fromPlaybackState(Object obj) {
ArrayList arrayList = null;
if (obj == null) {
return null;
}
PlaybackState playbackState = (PlaybackState) obj;
List<PlaybackState.CustomAction> customActions = playbackState.getCustomActions();
if (customActions != null) {
arrayList = new ArrayList(customActions.size());
Iterator<PlaybackState.CustomAction> it = customActions.iterator();
while (it.hasNext()) {
arrayList.add(CustomAction.fromCustomAction(it.next()));
}
}
Bundle extras = playbackState.getExtras();
MediaSessionCompat.ensureClassLoader(extras);
PlaybackStateCompat playbackStateCompat = new PlaybackStateCompat(playbackState.getState(), playbackState.getPosition(), playbackState.getBufferedPosition(), playbackState.getPlaybackSpeed(), playbackState.getActions(), 0, playbackState.getErrorMessage(), playbackState.getLastPositionUpdateTime(), arrayList, playbackState.getActiveQueueItemId(), extras);
playbackStateCompat.mStateFwk = playbackState;
return playbackStateCompat;
}
public Object getPlaybackState() {
if (this.mStateFwk == null) {
PlaybackState.Builder builder = new PlaybackState.Builder();
builder.setState(this.mState, this.mPosition, this.mSpeed, this.mUpdateTime);
builder.setBufferedPosition(this.mBufferedPosition);
builder.setActions(this.mActions);
builder.setErrorMessage(this.mErrorMessage);
Iterator<CustomAction> it = this.mCustomActions.iterator();
while (it.hasNext()) {
builder.addCustomAction((PlaybackState.CustomAction) it.next().getCustomAction());
}
builder.setActiveQueueItemId(this.mActiveItemId);
builder.setExtras(this.mExtras);
this.mStateFwk = builder.build();
}
return this.mStateFwk;
}
public static final class CustomAction implements Parcelable {
public static final Parcelable.Creator<CustomAction> CREATOR = new Parcelable.Creator<CustomAction>() { // from class: android.support.v4.media.session.PlaybackStateCompat.CustomAction.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public CustomAction createFromParcel(Parcel parcel) {
return new CustomAction(parcel);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public CustomAction[] newArray(int i) {
return new CustomAction[i];
}
};
private final String mAction;
private PlaybackState.CustomAction mCustomActionFwk;
private final Bundle mExtras;
private final int mIcon;
private final CharSequence mName;
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public String getAction() {
return this.mAction;
}
public Bundle getExtras() {
return this.mExtras;
}
public int getIcon() {
return this.mIcon;
}
public CharSequence getName() {
return this.mName;
}
public CustomAction(String str, CharSequence charSequence, int i, Bundle bundle) {
this.mAction = str;
this.mName = charSequence;
this.mIcon = i;
this.mExtras = bundle;
}
public CustomAction(Parcel parcel) {
this.mAction = parcel.readString();
this.mName = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
this.mIcon = parcel.readInt();
this.mExtras = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeString(this.mAction);
TextUtils.writeToParcel(this.mName, parcel, i);
parcel.writeInt(this.mIcon);
parcel.writeBundle(this.mExtras);
}
public static CustomAction fromCustomAction(Object obj) {
if (obj == null) {
return null;
}
PlaybackState.CustomAction customAction = (PlaybackState.CustomAction) obj;
Bundle extras = customAction.getExtras();
MediaSessionCompat.ensureClassLoader(extras);
CustomAction customAction2 = new CustomAction(customAction.getAction(), customAction.getName(), customAction.getIcon(), extras);
customAction2.mCustomActionFwk = customAction;
return customAction2;
}
public Object getCustomAction() {
PlaybackState.CustomAction customAction = this.mCustomActionFwk;
if (customAction != null) {
return customAction;
}
PlaybackState.CustomAction.Builder builder = new PlaybackState.CustomAction.Builder(this.mAction, this.mName, this.mIcon);
builder.setExtras(this.mExtras);
return builder.build();
}
public String toString() {
return "Action:mName='" + ((Object) this.mName) + ", mIcon=" + this.mIcon + ", mExtras=" + this.mExtras;
}
public static final class Builder {
private final String mAction;
private Bundle mExtras;
private final int mIcon;
private final CharSequence mName;
public Builder setExtras(Bundle bundle) {
this.mExtras = bundle;
return this;
}
public Builder(String str, CharSequence charSequence, int i) {
if (TextUtils.isEmpty(str)) {
throw new IllegalArgumentException("You must specify an action to build a CustomAction");
}
if (TextUtils.isEmpty(charSequence)) {
throw new IllegalArgumentException("You must specify a name to build a CustomAction");
}
if (i == 0) {
throw new IllegalArgumentException("You must specify an icon resource id to build a CustomAction");
}
this.mAction = str;
this.mName = charSequence;
this.mIcon = i;
}
public CustomAction build() {
return new CustomAction(this.mAction, this.mName, this.mIcon, this.mExtras);
}
}
}
public static final class Builder {
private long mActions;
private long mActiveItemId;
private long mBufferedPosition;
private final List<CustomAction> mCustomActions;
private int mErrorCode;
private CharSequence mErrorMessage;
private Bundle mExtras;
private long mPosition;
private float mRate;
private int mState;
private long mUpdateTime;
public Builder setActions(long j) {
this.mActions = j;
return this;
}
public Builder setActiveQueueItemId(long j) {
this.mActiveItemId = j;
return this;
}
public Builder setBufferedPosition(long j) {
this.mBufferedPosition = j;
return this;
}
public Builder setErrorMessage(int i, CharSequence charSequence) {
this.mErrorCode = i;
this.mErrorMessage = charSequence;
return this;
}
@Deprecated
public Builder setErrorMessage(CharSequence charSequence) {
this.mErrorMessage = charSequence;
return this;
}
public Builder setExtras(Bundle bundle) {
this.mExtras = bundle;
return this;
}
public Builder setState(int i, long j, float f, long j2) {
this.mState = i;
this.mPosition = j;
this.mUpdateTime = j2;
this.mRate = f;
return this;
}
public Builder() {
this.mCustomActions = new ArrayList();
this.mActiveItemId = -1L;
}
public Builder(PlaybackStateCompat playbackStateCompat) {
ArrayList arrayList = new ArrayList();
this.mCustomActions = arrayList;
this.mActiveItemId = -1L;
this.mState = playbackStateCompat.mState;
this.mPosition = playbackStateCompat.mPosition;
this.mRate = playbackStateCompat.mSpeed;
this.mUpdateTime = playbackStateCompat.mUpdateTime;
this.mBufferedPosition = playbackStateCompat.mBufferedPosition;
this.mActions = playbackStateCompat.mActions;
this.mErrorCode = playbackStateCompat.mErrorCode;
this.mErrorMessage = playbackStateCompat.mErrorMessage;
List<CustomAction> list = playbackStateCompat.mCustomActions;
if (list != null) {
arrayList.addAll(list);
}
this.mActiveItemId = playbackStateCompat.mActiveItemId;
this.mExtras = playbackStateCompat.mExtras;
}
public Builder setState(int i, long j, float f) {
return setState(i, j, f, SystemClock.elapsedRealtime());
}
public Builder addCustomAction(String str, String str2, int i) {
return addCustomAction(new CustomAction(str, str2, i, null));
}
public Builder addCustomAction(CustomAction customAction) {
if (customAction == null) {
throw new IllegalArgumentException("You may not add a null CustomAction to PlaybackStateCompat");
}
this.mCustomActions.add(customAction);
return this;
}
public PlaybackStateCompat build() {
return new PlaybackStateCompat(this.mState, this.mPosition, this.mBufferedPosition, this.mRate, this.mActions, this.mErrorCode, this.mErrorMessage, this.mUpdateTime, this.mCustomActions, this.mActiveItemId, this.mExtras);
}
}
}

View File

@@ -0,0 +1,120 @@
package android.support.v4.os;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import androidx.annotation.RestrictTo;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public interface IResultReceiver extends IInterface {
public static final String DESCRIPTOR = "android$support$v4$os$IResultReceiver".replace('$', '.');
public static class Default implements IResultReceiver {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // android.support.v4.os.IResultReceiver
public void send(int i, Bundle bundle) throws RemoteException {
}
}
void send(int i, Bundle bundle) throws RemoteException;
public static abstract class Stub extends Binder implements IResultReceiver {
static final int TRANSACTION_send = 1;
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, IResultReceiver.DESCRIPTOR);
}
public static IResultReceiver asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(IResultReceiver.DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof IResultReceiver)) {
return (IResultReceiver) queryLocalInterface;
}
return new Proxy(iBinder);
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
String str = IResultReceiver.DESCRIPTOR;
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(str);
}
if (i == 1598968902) {
parcel2.writeString(str);
return true;
}
if (i == 1) {
send(parcel.readInt(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
return true;
}
return super.onTransact(i, parcel, parcel2, i2);
}
public static class Proxy implements IResultReceiver {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return IResultReceiver.DESCRIPTOR;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.support.v4.os.IResultReceiver
public void send(int i, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IResultReceiver.DESCRIPTOR);
obtain.writeInt(i);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(1, obtain, null, 1);
} finally {
obtain.recycle();
}
}
}
}
public static class _Parcel {
/* JADX INFO: Access modifiers changed from: private */
public static <T> T readTypedObject(Parcel parcel, Parcelable.Creator<T> creator) {
if (parcel.readInt() != 0) {
return creator.createFromParcel(parcel);
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedObject(Parcel parcel, T t, int i) {
if (t != null) {
parcel.writeInt(1);
t.writeToParcel(parcel, i);
} else {
parcel.writeInt(0);
}
}
}
}

View File

@@ -0,0 +1,120 @@
package android.support.v4.os;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import androidx.annotation.RestrictTo;
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
public interface IResultReceiver2 extends IInterface {
public static final String DESCRIPTOR = "android$support$v4$os$IResultReceiver2".replace('$', '.');
public static class Default implements IResultReceiver2 {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // android.support.v4.os.IResultReceiver2
public void send(int i, Bundle bundle) throws RemoteException {
}
}
void send(int i, Bundle bundle) throws RemoteException;
public static abstract class Stub extends Binder implements IResultReceiver2 {
static final int TRANSACTION_send = 1;
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, IResultReceiver2.DESCRIPTOR);
}
public static IResultReceiver2 asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(IResultReceiver2.DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof IResultReceiver2)) {
return (IResultReceiver2) queryLocalInterface;
}
return new Proxy(iBinder);
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
String str = IResultReceiver2.DESCRIPTOR;
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(str);
}
if (i == 1598968902) {
parcel2.writeString(str);
return true;
}
if (i == 1) {
send(parcel.readInt(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR));
return true;
}
return super.onTransact(i, parcel, parcel2, i2);
}
public static class Proxy implements IResultReceiver2 {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return IResultReceiver2.DESCRIPTOR;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.support.v4.os.IResultReceiver2
public void send(int i, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IResultReceiver2.DESCRIPTOR);
obtain.writeInt(i);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(1, obtain, null, 1);
} finally {
obtain.recycle();
}
}
}
}
public static class _Parcel {
/* JADX INFO: Access modifiers changed from: private */
public static <T> T readTypedObject(Parcel parcel, Parcelable.Creator<T> creator) {
if (parcel.readInt() != 0) {
return creator.createFromParcel(parcel);
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedObject(Parcel parcel, T t, int i) {
if (t != null) {
parcel.writeInt(1);
t.writeToParcel(parcel, i);
} else {
parcel.writeInt(0);
}
}
}
}

View File

@@ -0,0 +1,117 @@
package android.support.v4.os;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.support.v4.os.IResultReceiver;
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
@SuppressLint({"BanParcelableUsage"})
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
/* loaded from: classes.dex */
public class ResultReceiver implements Parcelable {
public static final Parcelable.Creator<ResultReceiver> CREATOR = new Parcelable.Creator<ResultReceiver>() { // from class: android.support.v4.os.ResultReceiver.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public ResultReceiver createFromParcel(Parcel parcel) {
return new ResultReceiver(parcel);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public ResultReceiver[] newArray(int i) {
return new ResultReceiver[i];
}
};
final Handler mHandler;
final boolean mLocal;
IResultReceiver mReceiver;
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public void onReceiveResult(int i, Bundle bundle) {
}
public class MyRunnable implements Runnable {
final int mResultCode;
final Bundle mResultData;
public MyRunnable(int i, Bundle bundle) {
this.mResultCode = i;
this.mResultData = bundle;
}
@Override // java.lang.Runnable
public void run() {
ResultReceiver.this.onReceiveResult(this.mResultCode, this.mResultData);
}
}
public class MyResultReceiver extends IResultReceiver.Stub {
public MyResultReceiver() {
}
@Override // android.support.v4.os.IResultReceiver
public void send(int i, Bundle bundle) {
ResultReceiver resultReceiver = ResultReceiver.this;
Handler handler = resultReceiver.mHandler;
if (handler != null) {
handler.post(resultReceiver.new MyRunnable(i, bundle));
} else {
resultReceiver.onReceiveResult(i, bundle);
}
}
}
public ResultReceiver(Handler handler) {
this.mLocal = true;
this.mHandler = handler;
}
public void send(int i, Bundle bundle) {
if (this.mLocal) {
Handler handler = this.mHandler;
if (handler != null) {
handler.post(new MyRunnable(i, bundle));
return;
} else {
onReceiveResult(i, bundle);
return;
}
}
IResultReceiver iResultReceiver = this.mReceiver;
if (iResultReceiver != null) {
try {
iResultReceiver.send(i, bundle);
} catch (RemoteException unused) {
}
}
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
synchronized (this) {
try {
if (this.mReceiver == null) {
this.mReceiver = new MyResultReceiver();
}
parcel.writeStrongBinder(this.mReceiver.asBinder());
} catch (Throwable th) {
throw th;
}
}
}
public ResultReceiver(Parcel parcel) {
this.mLocal = false;
this.mHandler = null;
this.mReceiver = IResultReceiver.Stub.asInterface(parcel.readStrongBinder());
}
}

View File

@@ -0,0 +1,15 @@
package android.telephony;
/* loaded from: classes.dex */
public /* synthetic */ class TelephonyCallback {
public /* synthetic */ interface DisplayInfoListener {
static {
throw new NoClassDefFoundError();
}
}
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.view;
/* loaded from: classes.dex */
public /* synthetic */ interface OnReceiveContentListener {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.view;
/* loaded from: classes.dex */
public /* synthetic */ class WindowInsetsAnimation$Callback {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.view;
/* loaded from: classes.dex */
public /* synthetic */ interface WindowInsetsAnimationControlListener {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.view.inspector;
/* loaded from: classes.dex */
public /* synthetic */ interface InspectionCompanion {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.webkit;
/* loaded from: classes.dex */
public /* synthetic */ class WebViewRenderProcessClient {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,8 @@
package android.window;
/* loaded from: classes.dex */
public /* synthetic */ interface OnBackInvokedCallback {
static {
throw new NoClassDefFoundError();
}
}

View File

@@ -0,0 +1,6 @@
package androidx.activity;
/* loaded from: classes.dex */
public interface Cancellable {
void cancel();
}

View File

@@ -0,0 +1,881 @@
package androidx.activity;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.Window;
import android.window.OnBackInvokedDispatcher;
import androidx.activity.ComponentActivity;
import androidx.activity.contextaware.ContextAware;
import androidx.activity.contextaware.ContextAwareHelper;
import androidx.activity.contextaware.OnContextAvailableListener;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultCaller;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.ActivityResultRegistry;
import androidx.activity.result.ActivityResultRegistryOwner;
import androidx.activity.result.IntentSenderRequest;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.CallSuper;
import androidx.annotation.ContentView;
import androidx.annotation.DoNotInline;
import androidx.annotation.LayoutRes;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.OptIn;
import androidx.annotation.RequiresApi;
import androidx.core.app.ActivityCompat;
import androidx.core.app.ActivityOptionsCompat;
import androidx.core.app.MultiWindowModeChangedInfo;
import androidx.core.app.OnMultiWindowModeChangedProvider;
import androidx.core.app.OnNewIntentProvider;
import androidx.core.app.OnPictureInPictureModeChangedProvider;
import androidx.core.app.PictureInPictureModeChangedInfo;
import androidx.core.content.OnConfigurationChangedProvider;
import androidx.core.content.OnTrimMemoryProvider;
import androidx.core.os.BuildCompat;
import androidx.core.util.Consumer;
import androidx.core.view.MenuHost;
import androidx.core.view.MenuHostHelper;
import androidx.core.view.MenuProvider;
import androidx.lifecycle.HasDefaultViewModelProviderFactory;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleEventObserver;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleRegistry;
import androidx.lifecycle.ReportFragment;
import androidx.lifecycle.SavedStateHandleSupport;
import androidx.lifecycle.SavedStateViewModelFactory;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.ViewModelStoreOwner;
import androidx.lifecycle.ViewTreeLifecycleOwner;
import androidx.lifecycle.ViewTreeViewModelStoreOwner;
import androidx.lifecycle.viewmodel.CreationExtras;
import androidx.lifecycle.viewmodel.MutableCreationExtras;
import androidx.savedstate.SavedStateRegistry;
import androidx.savedstate.SavedStateRegistryController;
import androidx.savedstate.SavedStateRegistryOwner;
import androidx.savedstate.ViewTreeSavedStateRegistryOwner;
import androidx.tracing.Trace;
import androidx.work.WorkRequest;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicInteger;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* loaded from: classes.dex */
public class ComponentActivity extends androidx.core.app.ComponentActivity implements ContextAware, LifecycleOwner, ViewModelStoreOwner, HasDefaultViewModelProviderFactory, SavedStateRegistryOwner, OnBackPressedDispatcherOwner, ActivityResultRegistryOwner, ActivityResultCaller, OnConfigurationChangedProvider, OnTrimMemoryProvider, OnNewIntentProvider, OnMultiWindowModeChangedProvider, OnPictureInPictureModeChangedProvider, MenuHost, FullyDrawnReporterOwner {
private static final String ACTIVITY_RESULT_TAG = "android:support:activity-result";
private final ActivityResultRegistry mActivityResultRegistry;
@LayoutRes
private int mContentLayoutId;
final ContextAwareHelper mContextAwareHelper;
private ViewModelProvider.Factory mDefaultFactory;
private boolean mDispatchingOnMultiWindowModeChanged;
private boolean mDispatchingOnPictureInPictureModeChanged;
@NonNull
final FullyDrawnReporter mFullyDrawnReporter;
private final LifecycleRegistry mLifecycleRegistry;
private final MenuHostHelper mMenuHostHelper;
private final AtomicInteger mNextLocalRequestCode;
private final OnBackPressedDispatcher mOnBackPressedDispatcher;
private final CopyOnWriteArrayList<Consumer<Configuration>> mOnConfigurationChangedListeners;
private final CopyOnWriteArrayList<Consumer<MultiWindowModeChangedInfo>> mOnMultiWindowModeChangedListeners;
private final CopyOnWriteArrayList<Consumer<Intent>> mOnNewIntentListeners;
private final CopyOnWriteArrayList<Consumer<PictureInPictureModeChangedInfo>> mOnPictureInPictureModeChangedListeners;
private final CopyOnWriteArrayList<Consumer<Integer>> mOnTrimMemoryListeners;
private final ReportFullyDrawnExecutor mReportFullyDrawnExecutor;
final SavedStateRegistryController mSavedStateRegistryController;
private ViewModelStore mViewModelStore;
public static final class NonConfigurationInstances {
Object custom;
ViewModelStore viewModelStore;
}
public interface ReportFullyDrawnExecutor extends Executor {
void viewCreated(@NonNull View view);
}
@Override // androidx.activity.result.ActivityResultRegistryOwner
@NonNull
public final ActivityResultRegistry getActivityResultRegistry() {
return this.mActivityResultRegistry;
}
@Override // androidx.activity.FullyDrawnReporterOwner
@NonNull
public FullyDrawnReporter getFullyDrawnReporter() {
return this.mFullyDrawnReporter;
}
@Override // androidx.core.app.ComponentActivity, androidx.lifecycle.LifecycleOwner
@NonNull
public Lifecycle getLifecycle() {
return this.mLifecycleRegistry;
}
@Override // androidx.activity.OnBackPressedDispatcherOwner
@NonNull
public final OnBackPressedDispatcher getOnBackPressedDispatcher() {
return this.mOnBackPressedDispatcher;
}
@Nullable
@Deprecated
public Object onRetainCustomNonConfigurationInstance() {
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ Unit lambda$new$0() {
reportFullyDrawn();
return null;
}
public ComponentActivity() {
this.mContextAwareHelper = new ContextAwareHelper();
this.mMenuHostHelper = new MenuHostHelper(new Runnable() { // from class: androidx.activity.ComponentActivity$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
ComponentActivity.this.invalidateMenu();
}
});
this.mLifecycleRegistry = new LifecycleRegistry(this);
SavedStateRegistryController create = SavedStateRegistryController.create(this);
this.mSavedStateRegistryController = create;
this.mOnBackPressedDispatcher = new OnBackPressedDispatcher(new Runnable() { // from class: androidx.activity.ComponentActivity.1
@Override // java.lang.Runnable
public void run() {
try {
ComponentActivity.super.onBackPressed();
} catch (IllegalStateException e) {
if (!TextUtils.equals(e.getMessage(), "Can not perform this action after onSaveInstanceState")) {
throw e;
}
}
}
});
ReportFullyDrawnExecutor createFullyDrawnExecutor = createFullyDrawnExecutor();
this.mReportFullyDrawnExecutor = createFullyDrawnExecutor;
this.mFullyDrawnReporter = new FullyDrawnReporter(createFullyDrawnExecutor, new Function0() { // from class: androidx.activity.ComponentActivity$$ExternalSyntheticLambda1
@Override // kotlin.jvm.functions.Function0
public final Object invoke() {
Unit lambda$new$0;
lambda$new$0 = ComponentActivity.this.lambda$new$0();
return lambda$new$0;
}
});
this.mNextLocalRequestCode = new AtomicInteger();
this.mActivityResultRegistry = new ActivityResultRegistry() { // from class: androidx.activity.ComponentActivity.2
@Override // androidx.activity.result.ActivityResultRegistry
public <I, O> void onLaunch(final int i, @NonNull ActivityResultContract<I, O> activityResultContract, I i2, @Nullable ActivityOptionsCompat activityOptionsCompat) {
Bundle bundle;
ComponentActivity componentActivity = ComponentActivity.this;
final ActivityResultContract.SynchronousResult<O> synchronousResult = activityResultContract.getSynchronousResult(componentActivity, i2);
if (synchronousResult != null) {
new Handler(Looper.getMainLooper()).post(new Runnable() { // from class: androidx.activity.ComponentActivity.2.1
@Override // java.lang.Runnable
public void run() {
dispatchResult(i, synchronousResult.getValue());
}
});
return;
}
Intent createIntent = activityResultContract.createIntent(componentActivity, i2);
if (createIntent.getExtras() != null && createIntent.getExtras().getClassLoader() == null) {
createIntent.setExtrasClassLoader(componentActivity.getClassLoader());
}
if (createIntent.hasExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE)) {
Bundle bundleExtra = createIntent.getBundleExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE);
createIntent.removeExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE);
bundle = bundleExtra;
} else {
bundle = activityOptionsCompat != null ? activityOptionsCompat.toBundle() : null;
}
if (ActivityResultContracts.RequestMultiplePermissions.ACTION_REQUEST_PERMISSIONS.equals(createIntent.getAction())) {
String[] stringArrayExtra = createIntent.getStringArrayExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSIONS);
if (stringArrayExtra == null) {
stringArrayExtra = new String[0];
}
ActivityCompat.requestPermissions(componentActivity, stringArrayExtra, i);
return;
}
if (ActivityResultContracts.StartIntentSenderForResult.ACTION_INTENT_SENDER_REQUEST.equals(createIntent.getAction())) {
IntentSenderRequest intentSenderRequest = (IntentSenderRequest) createIntent.getParcelableExtra(ActivityResultContracts.StartIntentSenderForResult.EXTRA_INTENT_SENDER_REQUEST);
try {
ActivityCompat.startIntentSenderForResult(componentActivity, intentSenderRequest.getIntentSender(), i, intentSenderRequest.getFillInIntent(), intentSenderRequest.getFlagsMask(), intentSenderRequest.getFlagsValues(), 0, bundle);
return;
} catch (IntentSender.SendIntentException e) {
new Handler(Looper.getMainLooper()).post(new Runnable() { // from class: androidx.activity.ComponentActivity.2.2
@Override // java.lang.Runnable
public void run() {
dispatchResult(i, 0, new Intent().setAction(ActivityResultContracts.StartIntentSenderForResult.ACTION_INTENT_SENDER_REQUEST).putExtra(ActivityResultContracts.StartIntentSenderForResult.EXTRA_SEND_INTENT_EXCEPTION, e));
}
});
return;
}
}
ActivityCompat.startActivityForResult(componentActivity, createIntent, i, bundle);
}
};
this.mOnConfigurationChangedListeners = new CopyOnWriteArrayList<>();
this.mOnTrimMemoryListeners = new CopyOnWriteArrayList<>();
this.mOnNewIntentListeners = new CopyOnWriteArrayList<>();
this.mOnMultiWindowModeChangedListeners = new CopyOnWriteArrayList<>();
this.mOnPictureInPictureModeChangedListeners = new CopyOnWriteArrayList<>();
this.mDispatchingOnMultiWindowModeChanged = false;
this.mDispatchingOnPictureInPictureModeChanged = false;
if (getLifecycle() == null) {
throw new IllegalStateException("getLifecycle() returned null in ComponentActivity's constructor. Please make sure you are lazily constructing your Lifecycle in the first call to getLifecycle() rather than relying on field initialization.");
}
getLifecycle().addObserver(new LifecycleEventObserver() { // from class: androidx.activity.ComponentActivity.3
@Override // androidx.lifecycle.LifecycleEventObserver
public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.Event event) {
if (event == Lifecycle.Event.ON_STOP) {
Window window = ComponentActivity.this.getWindow();
View peekDecorView = window != null ? window.peekDecorView() : null;
if (peekDecorView != null) {
Api19Impl.cancelPendingInputEvents(peekDecorView);
}
}
}
});
getLifecycle().addObserver(new LifecycleEventObserver() { // from class: androidx.activity.ComponentActivity.4
@Override // androidx.lifecycle.LifecycleEventObserver
public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.Event event) {
if (event == Lifecycle.Event.ON_DESTROY) {
ComponentActivity.this.mContextAwareHelper.clearAvailableContext();
if (ComponentActivity.this.isChangingConfigurations()) {
return;
}
ComponentActivity.this.getViewModelStore().clear();
}
}
});
getLifecycle().addObserver(new LifecycleEventObserver() { // from class: androidx.activity.ComponentActivity.5
@Override // androidx.lifecycle.LifecycleEventObserver
public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.Event event) {
ComponentActivity.this.ensureViewModelStore();
ComponentActivity.this.getLifecycle().removeObserver(this);
}
});
create.performAttach();
SavedStateHandleSupport.enableSavedStateHandles(this);
getSavedStateRegistry().registerSavedStateProvider(ACTIVITY_RESULT_TAG, new SavedStateRegistry.SavedStateProvider() { // from class: androidx.activity.ComponentActivity$$ExternalSyntheticLambda2
@Override // androidx.savedstate.SavedStateRegistry.SavedStateProvider
public final Bundle saveState() {
Bundle lambda$new$1;
lambda$new$1 = ComponentActivity.this.lambda$new$1();
return lambda$new$1;
}
});
addOnContextAvailableListener(new OnContextAvailableListener() { // from class: androidx.activity.ComponentActivity$$ExternalSyntheticLambda3
@Override // androidx.activity.contextaware.OnContextAvailableListener
public final void onContextAvailable(Context context) {
ComponentActivity.this.lambda$new$2(context);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ Bundle lambda$new$1() {
Bundle bundle = new Bundle();
this.mActivityResultRegistry.onSaveInstanceState(bundle);
return bundle;
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void lambda$new$2(Context context) {
Bundle consumeRestoredStateForKey = getSavedStateRegistry().consumeRestoredStateForKey(ACTIVITY_RESULT_TAG);
if (consumeRestoredStateForKey != null) {
this.mActivityResultRegistry.onRestoreInstanceState(consumeRestoredStateForKey);
}
}
@ContentView
public ComponentActivity(@LayoutRes int i) {
this();
this.mContentLayoutId = i;
}
@Override // androidx.core.app.ComponentActivity, android.app.Activity
@OptIn(markerClass = {BuildCompat.PrereleaseSdkCheck.class})
public void onCreate(@Nullable Bundle bundle) {
this.mSavedStateRegistryController.performRestore(bundle);
this.mContextAwareHelper.dispatchOnContextAvailable(this);
super.onCreate(bundle);
ReportFragment.injectIfNeededIn(this);
if (BuildCompat.isAtLeastT()) {
this.mOnBackPressedDispatcher.setOnBackInvokedDispatcher(Api33Impl.getOnBackInvokedDispatcher(this));
}
int i = this.mContentLayoutId;
if (i != 0) {
setContentView(i);
}
}
@Override // androidx.core.app.ComponentActivity, android.app.Activity
@CallSuper
public void onSaveInstanceState(@NonNull Bundle bundle) {
Lifecycle lifecycle = getLifecycle();
if (lifecycle instanceof LifecycleRegistry) {
((LifecycleRegistry) lifecycle).setCurrentState(Lifecycle.State.CREATED);
}
super.onSaveInstanceState(bundle);
this.mSavedStateRegistryController.performSave(bundle);
}
@Override // android.app.Activity
@Nullable
public final Object onRetainNonConfigurationInstance() {
NonConfigurationInstances nonConfigurationInstances;
Object onRetainCustomNonConfigurationInstance = onRetainCustomNonConfigurationInstance();
ViewModelStore viewModelStore = this.mViewModelStore;
if (viewModelStore == null && (nonConfigurationInstances = (NonConfigurationInstances) getLastNonConfigurationInstance()) != null) {
viewModelStore = nonConfigurationInstances.viewModelStore;
}
if (viewModelStore == null && onRetainCustomNonConfigurationInstance == null) {
return null;
}
NonConfigurationInstances nonConfigurationInstances2 = new NonConfigurationInstances();
nonConfigurationInstances2.custom = onRetainCustomNonConfigurationInstance;
nonConfigurationInstances2.viewModelStore = viewModelStore;
return nonConfigurationInstances2;
}
@Nullable
@Deprecated
public Object getLastCustomNonConfigurationInstance() {
NonConfigurationInstances nonConfigurationInstances = (NonConfigurationInstances) getLastNonConfigurationInstance();
if (nonConfigurationInstances != null) {
return nonConfigurationInstances.custom;
}
return null;
}
@Override // android.app.Activity
public void setContentView(@LayoutRes int i) {
initViewTreeOwners();
this.mReportFullyDrawnExecutor.viewCreated(getWindow().getDecorView());
super.setContentView(i);
}
@Override // android.app.Activity
public void setContentView(@SuppressLint({"UnknownNullness", "MissingNullability"}) View view) {
initViewTreeOwners();
this.mReportFullyDrawnExecutor.viewCreated(getWindow().getDecorView());
super.setContentView(view);
}
@Override // android.app.Activity
public void setContentView(@SuppressLint({"UnknownNullness", "MissingNullability"}) View view, @SuppressLint({"UnknownNullness", "MissingNullability"}) ViewGroup.LayoutParams layoutParams) {
initViewTreeOwners();
this.mReportFullyDrawnExecutor.viewCreated(getWindow().getDecorView());
super.setContentView(view, layoutParams);
}
@Override // android.app.Activity
public void addContentView(@SuppressLint({"UnknownNullness", "MissingNullability"}) View view, @SuppressLint({"UnknownNullness", "MissingNullability"}) ViewGroup.LayoutParams layoutParams) {
initViewTreeOwners();
this.mReportFullyDrawnExecutor.viewCreated(getWindow().getDecorView());
super.addContentView(view, layoutParams);
}
private void initViewTreeOwners() {
ViewTreeLifecycleOwner.set(getWindow().getDecorView(), this);
ViewTreeViewModelStoreOwner.set(getWindow().getDecorView(), this);
ViewTreeSavedStateRegistryOwner.set(getWindow().getDecorView(), this);
ViewTreeOnBackPressedDispatcherOwner.set(getWindow().getDecorView(), this);
ViewTreeFullyDrawnReporterOwner.set(getWindow().getDecorView(), this);
}
@Override // androidx.activity.contextaware.ContextAware
@Nullable
public Context peekAvailableContext() {
return this.mContextAwareHelper.peekAvailableContext();
}
@Override // androidx.activity.contextaware.ContextAware
public final void addOnContextAvailableListener(@NonNull OnContextAvailableListener onContextAvailableListener) {
this.mContextAwareHelper.addOnContextAvailableListener(onContextAvailableListener);
}
@Override // androidx.activity.contextaware.ContextAware
public final void removeOnContextAvailableListener(@NonNull OnContextAvailableListener onContextAvailableListener) {
this.mContextAwareHelper.removeOnContextAvailableListener(onContextAvailableListener);
}
@Override // android.app.Activity, android.view.Window.Callback
public boolean onPreparePanel(int i, @Nullable View view, @NonNull Menu menu) {
if (i != 0) {
return true;
}
super.onPreparePanel(i, view, menu);
this.mMenuHostHelper.onPrepareMenu(menu);
return true;
}
@Override // android.app.Activity, android.view.Window.Callback
public boolean onCreatePanelMenu(int i, @NonNull Menu menu) {
if (i != 0) {
return true;
}
super.onCreatePanelMenu(i, menu);
this.mMenuHostHelper.onCreateMenu(menu, getMenuInflater());
return true;
}
@Override // android.app.Activity, android.view.Window.Callback
public boolean onMenuItemSelected(int i, @NonNull MenuItem menuItem) {
if (super.onMenuItemSelected(i, menuItem)) {
return true;
}
if (i == 0) {
return this.mMenuHostHelper.onMenuItemSelected(menuItem);
}
return false;
}
@Override // android.app.Activity, android.view.Window.Callback
public void onPanelClosed(int i, @NonNull Menu menu) {
this.mMenuHostHelper.onMenuClosed(menu);
super.onPanelClosed(i, menu);
}
@Override // androidx.core.view.MenuHost
public void addMenuProvider(@NonNull MenuProvider menuProvider) {
this.mMenuHostHelper.addMenuProvider(menuProvider);
}
@Override // androidx.core.view.MenuHost
public void addMenuProvider(@NonNull MenuProvider menuProvider, @NonNull LifecycleOwner lifecycleOwner) {
this.mMenuHostHelper.addMenuProvider(menuProvider, lifecycleOwner);
}
@Override // androidx.core.view.MenuHost
@SuppressLint({"LambdaLast"})
public void addMenuProvider(@NonNull MenuProvider menuProvider, @NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.State state) {
this.mMenuHostHelper.addMenuProvider(menuProvider, lifecycleOwner, state);
}
@Override // androidx.core.view.MenuHost
public void removeMenuProvider(@NonNull MenuProvider menuProvider) {
this.mMenuHostHelper.removeMenuProvider(menuProvider);
}
@Override // androidx.core.view.MenuHost
public void invalidateMenu() {
invalidateOptionsMenu();
}
@Override // androidx.lifecycle.ViewModelStoreOwner
@NonNull
public ViewModelStore getViewModelStore() {
if (getApplication() == null) {
throw new IllegalStateException("Your activity is not yet attached to the Application instance. You can't request ViewModel before onCreate call.");
}
ensureViewModelStore();
return this.mViewModelStore;
}
public void ensureViewModelStore() {
if (this.mViewModelStore == null) {
NonConfigurationInstances nonConfigurationInstances = (NonConfigurationInstances) getLastNonConfigurationInstance();
if (nonConfigurationInstances != null) {
this.mViewModelStore = nonConfigurationInstances.viewModelStore;
}
if (this.mViewModelStore == null) {
this.mViewModelStore = new ViewModelStore();
}
}
}
@Override // androidx.lifecycle.HasDefaultViewModelProviderFactory
@NonNull
public ViewModelProvider.Factory getDefaultViewModelProviderFactory() {
if (this.mDefaultFactory == null) {
this.mDefaultFactory = new SavedStateViewModelFactory(getApplication(), this, getIntent() != null ? getIntent().getExtras() : null);
}
return this.mDefaultFactory;
}
@Override // androidx.lifecycle.HasDefaultViewModelProviderFactory
@NonNull
@CallSuper
public CreationExtras getDefaultViewModelCreationExtras() {
MutableCreationExtras mutableCreationExtras = new MutableCreationExtras();
if (getApplication() != null) {
mutableCreationExtras.set(ViewModelProvider.AndroidViewModelFactory.APPLICATION_KEY, getApplication());
}
mutableCreationExtras.set(SavedStateHandleSupport.SAVED_STATE_REGISTRY_OWNER_KEY, this);
mutableCreationExtras.set(SavedStateHandleSupport.VIEW_MODEL_STORE_OWNER_KEY, this);
if (getIntent() != null && getIntent().getExtras() != null) {
mutableCreationExtras.set(SavedStateHandleSupport.DEFAULT_ARGS_KEY, getIntent().getExtras());
}
return mutableCreationExtras;
}
@Override // android.app.Activity
@MainThread
public void onBackPressed() {
this.mOnBackPressedDispatcher.onBackPressed();
}
@Override // androidx.savedstate.SavedStateRegistryOwner
@NonNull
public final SavedStateRegistry getSavedStateRegistry() {
return this.mSavedStateRegistryController.getSavedStateRegistry();
}
@Override // android.app.Activity
@Deprecated
public void startActivityForResult(@NonNull Intent intent, int i) {
super.startActivityForResult(intent, i);
}
@Override // android.app.Activity
@Deprecated
public void startActivityForResult(@NonNull Intent intent, int i, @Nullable Bundle bundle) {
super.startActivityForResult(intent, i, bundle);
}
@Override // android.app.Activity
@Deprecated
public void startIntentSenderForResult(@NonNull IntentSender intentSender, int i, @Nullable Intent intent, int i2, int i3, int i4) throws IntentSender.SendIntentException {
super.startIntentSenderForResult(intentSender, i, intent, i2, i3, i4);
}
@Override // android.app.Activity
@Deprecated
public void startIntentSenderForResult(@NonNull IntentSender intentSender, int i, @Nullable Intent intent, int i2, int i3, int i4, @Nullable Bundle bundle) throws IntentSender.SendIntentException {
super.startIntentSenderForResult(intentSender, i, intent, i2, i3, i4, bundle);
}
@Override // android.app.Activity
@CallSuper
@Deprecated
public void onActivityResult(int i, int i2, @Nullable Intent intent) {
if (this.mActivityResultRegistry.dispatchResult(i, i2, intent)) {
return;
}
super.onActivityResult(i, i2, intent);
}
@Override // android.app.Activity
@CallSuper
@Deprecated
public void onRequestPermissionsResult(int i, @NonNull String[] strArr, @NonNull int[] iArr) {
if (this.mActivityResultRegistry.dispatchResult(i, -1, new Intent().putExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSIONS, strArr).putExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSION_GRANT_RESULTS, iArr))) {
return;
}
super.onRequestPermissionsResult(i, strArr, iArr);
}
@Override // androidx.activity.result.ActivityResultCaller
@NonNull
public final <I, O> ActivityResultLauncher<I> registerForActivityResult(@NonNull ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultRegistry activityResultRegistry, @NonNull ActivityResultCallback<O> activityResultCallback) {
return activityResultRegistry.register("activity_rq#" + this.mNextLocalRequestCode.getAndIncrement(), this, activityResultContract, activityResultCallback);
}
@Override // androidx.activity.result.ActivityResultCaller
@NonNull
public final <I, O> ActivityResultLauncher<I> registerForActivityResult(@NonNull ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultCallback<O> activityResultCallback) {
return registerForActivityResult(activityResultContract, this.mActivityResultRegistry, activityResultCallback);
}
@Override // android.app.Activity, android.content.ComponentCallbacks
@CallSuper
public void onConfigurationChanged(@NonNull Configuration configuration) {
super.onConfigurationChanged(configuration);
Iterator<Consumer<Configuration>> it = this.mOnConfigurationChangedListeners.iterator();
while (it.hasNext()) {
it.next().accept(configuration);
}
}
@Override // androidx.core.content.OnConfigurationChangedProvider
public final void addOnConfigurationChangedListener(@NonNull Consumer<Configuration> consumer) {
this.mOnConfigurationChangedListeners.add(consumer);
}
@Override // androidx.core.content.OnConfigurationChangedProvider
public final void removeOnConfigurationChangedListener(@NonNull Consumer<Configuration> consumer) {
this.mOnConfigurationChangedListeners.remove(consumer);
}
@Override // android.app.Activity, android.content.ComponentCallbacks2
@CallSuper
public void onTrimMemory(int i) {
super.onTrimMemory(i);
Iterator<Consumer<Integer>> it = this.mOnTrimMemoryListeners.iterator();
while (it.hasNext()) {
it.next().accept(Integer.valueOf(i));
}
}
@Override // androidx.core.content.OnTrimMemoryProvider
public final void addOnTrimMemoryListener(@NonNull Consumer<Integer> consumer) {
this.mOnTrimMemoryListeners.add(consumer);
}
@Override // androidx.core.content.OnTrimMemoryProvider
public final void removeOnTrimMemoryListener(@NonNull Consumer<Integer> consumer) {
this.mOnTrimMemoryListeners.remove(consumer);
}
@Override // android.app.Activity
@CallSuper
public void onNewIntent(@SuppressLint({"UnknownNullness", "MissingNullability"}) Intent intent) {
super.onNewIntent(intent);
Iterator<Consumer<Intent>> it = this.mOnNewIntentListeners.iterator();
while (it.hasNext()) {
it.next().accept(intent);
}
}
@Override // androidx.core.app.OnNewIntentProvider
public final void addOnNewIntentListener(@NonNull Consumer<Intent> consumer) {
this.mOnNewIntentListeners.add(consumer);
}
@Override // androidx.core.app.OnNewIntentProvider
public final void removeOnNewIntentListener(@NonNull Consumer<Intent> consumer) {
this.mOnNewIntentListeners.remove(consumer);
}
@Override // android.app.Activity
@CallSuper
public void onMultiWindowModeChanged(boolean z) {
if (this.mDispatchingOnMultiWindowModeChanged) {
return;
}
Iterator<Consumer<MultiWindowModeChangedInfo>> it = this.mOnMultiWindowModeChangedListeners.iterator();
while (it.hasNext()) {
it.next().accept(new MultiWindowModeChangedInfo(z));
}
}
@Override // android.app.Activity
@RequiresApi(api = 26)
@CallSuper
public void onMultiWindowModeChanged(boolean z, @NonNull Configuration configuration) {
this.mDispatchingOnMultiWindowModeChanged = true;
try {
super.onMultiWindowModeChanged(z, configuration);
this.mDispatchingOnMultiWindowModeChanged = false;
Iterator<Consumer<MultiWindowModeChangedInfo>> it = this.mOnMultiWindowModeChangedListeners.iterator();
while (it.hasNext()) {
it.next().accept(new MultiWindowModeChangedInfo(z, configuration));
}
} catch (Throwable th) {
this.mDispatchingOnMultiWindowModeChanged = false;
throw th;
}
}
@Override // androidx.core.app.OnMultiWindowModeChangedProvider
public final void addOnMultiWindowModeChangedListener(@NonNull Consumer<MultiWindowModeChangedInfo> consumer) {
this.mOnMultiWindowModeChangedListeners.add(consumer);
}
@Override // androidx.core.app.OnMultiWindowModeChangedProvider
public final void removeOnMultiWindowModeChangedListener(@NonNull Consumer<MultiWindowModeChangedInfo> consumer) {
this.mOnMultiWindowModeChangedListeners.remove(consumer);
}
@Override // android.app.Activity
@CallSuper
public void onPictureInPictureModeChanged(boolean z) {
if (this.mDispatchingOnPictureInPictureModeChanged) {
return;
}
Iterator<Consumer<PictureInPictureModeChangedInfo>> it = this.mOnPictureInPictureModeChangedListeners.iterator();
while (it.hasNext()) {
it.next().accept(new PictureInPictureModeChangedInfo(z));
}
}
@Override // android.app.Activity
@RequiresApi(api = 26)
@CallSuper
public void onPictureInPictureModeChanged(boolean z, @NonNull Configuration configuration) {
this.mDispatchingOnPictureInPictureModeChanged = true;
try {
super.onPictureInPictureModeChanged(z, configuration);
this.mDispatchingOnPictureInPictureModeChanged = false;
Iterator<Consumer<PictureInPictureModeChangedInfo>> it = this.mOnPictureInPictureModeChangedListeners.iterator();
while (it.hasNext()) {
it.next().accept(new PictureInPictureModeChangedInfo(z, configuration));
}
} catch (Throwable th) {
this.mDispatchingOnPictureInPictureModeChanged = false;
throw th;
}
}
@Override // androidx.core.app.OnPictureInPictureModeChangedProvider
public final void addOnPictureInPictureModeChangedListener(@NonNull Consumer<PictureInPictureModeChangedInfo> consumer) {
this.mOnPictureInPictureModeChangedListeners.add(consumer);
}
@Override // androidx.core.app.OnPictureInPictureModeChangedProvider
public final void removeOnPictureInPictureModeChangedListener(@NonNull Consumer<PictureInPictureModeChangedInfo> consumer) {
this.mOnPictureInPictureModeChangedListeners.remove(consumer);
}
@Override // android.app.Activity
public void reportFullyDrawn() {
try {
if (Trace.isEnabled()) {
Trace.beginSection("reportFullyDrawn() for ComponentActivity");
}
super.reportFullyDrawn();
this.mFullyDrawnReporter.fullyDrawnReported();
Trace.endSection();
} catch (Throwable th) {
Trace.endSection();
throw th;
}
}
private ReportFullyDrawnExecutor createFullyDrawnExecutor() {
return new ReportFullyDrawnExecutorApi16Impl();
}
@RequiresApi(19)
public static class Api19Impl {
private Api19Impl() {
}
public static void cancelPendingInputEvents(View view) {
view.cancelPendingInputEvents();
}
}
@RequiresApi(33)
public static class Api33Impl {
private Api33Impl() {
}
@DoNotInline
public static OnBackInvokedDispatcher getOnBackInvokedDispatcher(Activity activity) {
return activity.getOnBackInvokedDispatcher();
}
}
public static class ReportFullyDrawnExecutorApi1 implements ReportFullyDrawnExecutor {
final Handler mHandler = createHandler();
@Override // androidx.activity.ComponentActivity.ReportFullyDrawnExecutor
public void viewCreated(@NonNull View view) {
}
@Override // java.util.concurrent.Executor
public void execute(Runnable runnable) {
this.mHandler.postAtFrontOfQueue(runnable);
}
@NonNull
private Handler createHandler() {
Looper myLooper = Looper.myLooper();
if (myLooper == null) {
myLooper = Looper.getMainLooper();
}
return new Handler(myLooper);
}
}
@RequiresApi(16)
public class ReportFullyDrawnExecutorApi16Impl implements ReportFullyDrawnExecutor, ViewTreeObserver.OnDrawListener, Runnable {
final long mEndWatchTimeMillis = SystemClock.uptimeMillis() + WorkRequest.MIN_BACKOFF_MILLIS;
boolean mOnDrawScheduled = false;
Runnable mRunnable;
public ReportFullyDrawnExecutorApi16Impl() {
}
@Override // androidx.activity.ComponentActivity.ReportFullyDrawnExecutor
public void viewCreated(@NonNull View view) {
if (this.mOnDrawScheduled) {
return;
}
this.mOnDrawScheduled = true;
view.getViewTreeObserver().addOnDrawListener(this);
}
@Override // java.util.concurrent.Executor
public void execute(Runnable runnable) {
this.mRunnable = runnable;
View decorView = ComponentActivity.this.getWindow().getDecorView();
if (this.mOnDrawScheduled) {
if (Looper.myLooper() == Looper.getMainLooper()) {
decorView.invalidate();
return;
} else {
decorView.postInvalidate();
return;
}
}
decorView.postOnAnimation(new Runnable() { // from class: androidx.activity.ComponentActivity$ReportFullyDrawnExecutorApi16Impl$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
ComponentActivity.ReportFullyDrawnExecutorApi16Impl.this.lambda$execute$0();
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void lambda$execute$0() {
Runnable runnable = this.mRunnable;
if (runnable != null) {
runnable.run();
this.mRunnable = null;
}
}
@Override // android.view.ViewTreeObserver.OnDrawListener
public void onDraw() {
Runnable runnable = this.mRunnable;
if (runnable == null) {
if (SystemClock.uptimeMillis() > this.mEndWatchTimeMillis) {
this.mOnDrawScheduled = false;
ComponentActivity.this.getWindow().getDecorView().post(this);
return;
}
return;
}
runnable.run();
this.mRunnable = null;
if (ComponentActivity.this.mFullyDrawnReporter.isFullyDrawnReported()) {
this.mOnDrawScheduled = false;
ComponentActivity.this.getWindow().getDecorView().post(this);
}
}
@Override // java.lang.Runnable
public void run() {
ComponentActivity.this.getWindow().getDecorView().getViewTreeObserver().removeOnDrawListener(this);
}
}
}

View File

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

View File

@@ -0,0 +1,175 @@
package androidx.activity;
import android.app.Dialog;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.window.OnBackInvokedDispatcher;
import androidx.annotation.CallSuper;
import androidx.annotation.StyleRes;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleRegistry;
import androidx.lifecycle.ViewTreeLifecycleOwner;
import androidx.savedstate.SavedStateRegistry;
import androidx.savedstate.SavedStateRegistryController;
import androidx.savedstate.SavedStateRegistryOwner;
import androidx.savedstate.ViewTreeSavedStateRegistryOwner;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public class ComponentDialog extends Dialog implements LifecycleOwner, OnBackPressedDispatcherOwner, SavedStateRegistryOwner {
private LifecycleRegistry _lifecycleRegistry;
private final OnBackPressedDispatcher onBackPressedDispatcher;
private final SavedStateRegistryController savedStateRegistryController;
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public ComponentDialog(Context context) {
this(context, 0, 2, null);
Intrinsics.checkNotNullParameter(context, "context");
}
public static /* synthetic */ void getOnBackPressedDispatcher$annotations() {
}
@Override // androidx.activity.OnBackPressedDispatcherOwner
public final OnBackPressedDispatcher getOnBackPressedDispatcher() {
return this.onBackPressedDispatcher;
}
public /* synthetic */ ComponentDialog(Context context, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(context, (i2 & 2) != 0 ? 0 : i);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ComponentDialog(Context context, @StyleRes int i) {
super(context, i);
Intrinsics.checkNotNullParameter(context, "context");
this.savedStateRegistryController = SavedStateRegistryController.Companion.create(this);
this.onBackPressedDispatcher = new OnBackPressedDispatcher(new Runnable() { // from class: androidx.activity.ComponentDialog$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
ComponentDialog.onBackPressedDispatcher$lambda$1(ComponentDialog.this);
}
});
}
private final LifecycleRegistry getLifecycleRegistry() {
LifecycleRegistry lifecycleRegistry = this._lifecycleRegistry;
if (lifecycleRegistry != null) {
return lifecycleRegistry;
}
LifecycleRegistry lifecycleRegistry2 = new LifecycleRegistry(this);
this._lifecycleRegistry = lifecycleRegistry2;
return lifecycleRegistry2;
}
@Override // androidx.savedstate.SavedStateRegistryOwner
public SavedStateRegistry getSavedStateRegistry() {
return this.savedStateRegistryController.getSavedStateRegistry();
}
@Override // androidx.lifecycle.LifecycleOwner
public Lifecycle getLifecycle() {
return getLifecycleRegistry();
}
@Override // android.app.Dialog
public Bundle onSaveInstanceState() {
Bundle onSaveInstanceState = super.onSaveInstanceState();
Intrinsics.checkNotNullExpressionValue(onSaveInstanceState, "super.onSaveInstanceState()");
this.savedStateRegistryController.performSave(onSaveInstanceState);
return onSaveInstanceState;
}
@Override // android.app.Dialog
@CallSuper
public void onCreate(Bundle bundle) {
OnBackInvokedDispatcher onBackInvokedDispatcher;
super.onCreate(bundle);
if (Build.VERSION.SDK_INT >= 33) {
OnBackPressedDispatcher onBackPressedDispatcher = this.onBackPressedDispatcher;
onBackInvokedDispatcher = getOnBackInvokedDispatcher();
Intrinsics.checkNotNullExpressionValue(onBackInvokedDispatcher, "onBackInvokedDispatcher");
onBackPressedDispatcher.setOnBackInvokedDispatcher(onBackInvokedDispatcher);
}
this.savedStateRegistryController.performRestore(bundle);
getLifecycleRegistry().handleLifecycleEvent(Lifecycle.Event.ON_CREATE);
}
@Override // android.app.Dialog
@CallSuper
public void onStart() {
super.onStart();
getLifecycleRegistry().handleLifecycleEvent(Lifecycle.Event.ON_RESUME);
}
@Override // android.app.Dialog
@CallSuper
public void onStop() {
getLifecycleRegistry().handleLifecycleEvent(Lifecycle.Event.ON_DESTROY);
this._lifecycleRegistry = null;
super.onStop();
}
/* JADX INFO: Access modifiers changed from: private */
public static final void onBackPressedDispatcher$lambda$1(ComponentDialog this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
super.onBackPressed();
}
@Override // android.app.Dialog
@CallSuper
public void onBackPressed() {
this.onBackPressedDispatcher.onBackPressed();
}
@Override // android.app.Dialog
public void setContentView(int i) {
initViewTreeOwners();
super.setContentView(i);
}
@Override // android.app.Dialog
public void setContentView(View view) {
Intrinsics.checkNotNullParameter(view, "view");
initViewTreeOwners();
super.setContentView(view);
}
@Override // android.app.Dialog
public void setContentView(View view, ViewGroup.LayoutParams layoutParams) {
Intrinsics.checkNotNullParameter(view, "view");
initViewTreeOwners();
super.setContentView(view, layoutParams);
}
@Override // android.app.Dialog
public void addContentView(View view, ViewGroup.LayoutParams layoutParams) {
Intrinsics.checkNotNullParameter(view, "view");
initViewTreeOwners();
super.addContentView(view, layoutParams);
}
private final void initViewTreeOwners() {
Window window = getWindow();
Intrinsics.checkNotNull(window);
View decorView = window.getDecorView();
Intrinsics.checkNotNullExpressionValue(decorView, "window!!.decorView");
ViewTreeLifecycleOwner.set(decorView, this);
Window window2 = getWindow();
Intrinsics.checkNotNull(window2);
View decorView2 = window2.getDecorView();
Intrinsics.checkNotNullExpressionValue(decorView2, "window!!.decorView");
ViewTreeOnBackPressedDispatcherOwner.set(decorView2, this);
Window window3 = getWindow();
Intrinsics.checkNotNull(window3);
View decorView3 = window3.getDecorView();
Intrinsics.checkNotNullExpressionValue(decorView3, "window!!.decorView");
ViewTreeSavedStateRegistryOwner.set(decorView3, this);
}
}

View File

@@ -0,0 +1,153 @@
package androidx.activity;
import androidx.annotation.GuardedBy;
import androidx.annotation.RestrictTo;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.Executor;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nFullyDrawnReporter.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FullyDrawnReporter.kt\nandroidx/activity/FullyDrawnReporter\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,192:1\n1#2:193\n1855#3,2:194\n*S KotlinDebug\n*F\n+ 1 FullyDrawnReporter.kt\nandroidx/activity/FullyDrawnReporter\n*L\n157#1:194,2\n*E\n"})
/* loaded from: classes.dex */
public final class FullyDrawnReporter {
private final Executor executor;
private final Object lock;
@GuardedBy("lock")
private final List<Function0> onReportCallbacks;
private final Function0 reportFullyDrawn;
@GuardedBy("lock")
private boolean reportPosted;
private final Runnable reportRunnable;
@GuardedBy("lock")
private boolean reportedFullyDrawn;
@GuardedBy("lock")
private int reporterCount;
public FullyDrawnReporter(Executor executor, Function0 reportFullyDrawn) {
Intrinsics.checkNotNullParameter(executor, "executor");
Intrinsics.checkNotNullParameter(reportFullyDrawn, "reportFullyDrawn");
this.executor = executor;
this.reportFullyDrawn = reportFullyDrawn;
this.lock = new Object();
this.onReportCallbacks = new ArrayList();
this.reportRunnable = new Runnable() { // from class: androidx.activity.FullyDrawnReporter$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
FullyDrawnReporter.reportRunnable$lambda$2(FullyDrawnReporter.this);
}
};
}
public final boolean isFullyDrawnReported() {
boolean z;
synchronized (this.lock) {
z = this.reportedFullyDrawn;
}
return z;
}
/* JADX INFO: Access modifiers changed from: private */
public static final void reportRunnable$lambda$2(FullyDrawnReporter this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
synchronized (this$0.lock) {
try {
this$0.reportPosted = false;
if (this$0.reporterCount == 0 && !this$0.reportedFullyDrawn) {
this$0.reportFullyDrawn.invoke();
this$0.fullyDrawnReported();
}
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
}
public final void addReporter() {
synchronized (this.lock) {
try {
if (!this.reportedFullyDrawn) {
this.reporterCount++;
}
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
}
public final void removeReporter() {
synchronized (this.lock) {
try {
if (!this.reportedFullyDrawn) {
int i = this.reporterCount;
if (i <= 0) {
throw new IllegalStateException("removeReporter() called when all reporters have already been removed.".toString());
}
this.reporterCount = i - 1;
postWhenReportersAreDone();
}
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
}
public final void addOnReportDrawnListener(Function0 callback) {
boolean z;
Intrinsics.checkNotNullParameter(callback, "callback");
synchronized (this.lock) {
if (this.reportedFullyDrawn) {
z = true;
} else {
this.onReportCallbacks.add(callback);
z = false;
}
}
if (z) {
callback.invoke();
}
}
public final void removeOnReportDrawnListener(Function0 callback) {
Intrinsics.checkNotNullParameter(callback, "callback");
synchronized (this.lock) {
this.onReportCallbacks.remove(callback);
Unit unit = Unit.INSTANCE;
}
}
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
public final void fullyDrawnReported() {
synchronized (this.lock) {
try {
this.reportedFullyDrawn = true;
Iterator<T> it = this.onReportCallbacks.iterator();
while (it.hasNext()) {
((Function0) it.next()).invoke();
}
this.onReportCallbacks.clear();
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
}
private final void postWhenReportersAreDone() {
if (this.reportPosted || this.reporterCount != 0) {
return;
}
this.reportPosted = true;
this.executor.execute(this.reportRunnable);
}
}

View File

@@ -0,0 +1,26 @@
package androidx.activity;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.SourceDebugExtension;
@DebugMetadata(c = "androidx.activity.FullyDrawnReporterKt", f = "FullyDrawnReporter.kt", l = {188}, m = "reportWhenComplete")
@SourceDebugExtension({"SMAP\nFullyDrawnReporter.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FullyDrawnReporter.kt\nandroidx/activity/FullyDrawnReporterKt$reportWhenComplete$1\n*L\n1#1,192:1\n*E\n"})
/* loaded from: classes.dex */
public final class FullyDrawnReporterKt$reportWhenComplete$1 extends ContinuationImpl {
Object L$0;
int label;
/* synthetic */ Object result;
public FullyDrawnReporterKt$reportWhenComplete$1(Continuation continuation) {
super(continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return FullyDrawnReporterKt.reportWhenComplete(null, null, this);
}
}

View File

@@ -0,0 +1,99 @@
package androidx.activity;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.InlineMarker;
/* loaded from: classes.dex */
public final class FullyDrawnReporterKt {
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:18:0x0037 */
/* JADX WARN: Removed duplicated region for block: B:9:0x0023 */
/* JADX WARN: Type inference failed for: r4v4, types: [java.lang.Object, kotlin.Unit] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static final java.lang.Object reportWhenComplete(androidx.activity.FullyDrawnReporter r4, kotlin.jvm.functions.Function1 r5, kotlin.coroutines.Continuation r6) {
/*
boolean r0 = r6 instanceof androidx.activity.FullyDrawnReporterKt$reportWhenComplete$1
if (r0 == 0) goto L13
r0 = r6
androidx.activity.FullyDrawnReporterKt$reportWhenComplete$1 r0 = (androidx.activity.FullyDrawnReporterKt$reportWhenComplete$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
androidx.activity.FullyDrawnReporterKt$reportWhenComplete$1 r0 = new androidx.activity.FullyDrawnReporterKt$reportWhenComplete$1
r0.<init>(r6)
L18:
java.lang.Object r6 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L37
if (r2 != r3) goto L2f
java.lang.Object r4 = r0.L$0
androidx.activity.FullyDrawnReporter r4 = (androidx.activity.FullyDrawnReporter) r4
kotlin.ResultKt.throwOnFailure(r6) // Catch: java.lang.Throwable -> L2d
goto L51
L2d:
r5 = move-exception
goto L5d
L2f:
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
r4.<init>(r5)
throw r4
L37:
kotlin.ResultKt.throwOnFailure(r6)
r4.addReporter()
boolean r6 = r4.isFullyDrawnReported()
if (r6 == 0) goto L46
kotlin.Unit r4 = kotlin.Unit.INSTANCE
return r4
L46:
r0.L$0 = r4 // Catch: java.lang.Throwable -> L2d
r0.label = r3 // Catch: java.lang.Throwable -> L2d
java.lang.Object r5 = r5.invoke(r0) // Catch: java.lang.Throwable -> L2d
if (r5 != r1) goto L51
return r1
L51:
kotlin.jvm.internal.InlineMarker.finallyStart(r3)
r4.removeReporter()
kotlin.jvm.internal.InlineMarker.finallyEnd(r3)
kotlin.Unit r4 = kotlin.Unit.INSTANCE
return r4
L5d:
kotlin.jvm.internal.InlineMarker.finallyStart(r3)
r4.removeReporter()
kotlin.jvm.internal.InlineMarker.finallyEnd(r3)
throw r5
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.activity.FullyDrawnReporterKt.reportWhenComplete(androidx.activity.FullyDrawnReporter, kotlin.jvm.functions.Function1, kotlin.coroutines.Continuation):java.lang.Object");
}
private static final Object reportWhenComplete$$forInline(FullyDrawnReporter fullyDrawnReporter, Function1 function1, Continuation continuation) {
fullyDrawnReporter.addReporter();
if (fullyDrawnReporter.isFullyDrawnReported()) {
return Unit.INSTANCE;
}
try {
function1.invoke(continuation);
InlineMarker.finallyStart(1);
fullyDrawnReporter.removeReporter();
InlineMarker.finallyEnd(1);
return Unit.INSTANCE;
} catch (Throwable th) {
InlineMarker.finallyStart(1);
fullyDrawnReporter.removeReporter();
InlineMarker.finallyEnd(1);
throw th;
}
}
}

View File

@@ -0,0 +1,6 @@
package androidx.activity;
/* loaded from: classes.dex */
public interface FullyDrawnReporterOwner {
FullyDrawnReporter getFullyDrawnReporter();
}

View File

@@ -0,0 +1,93 @@
package androidx.activity;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleEventObserver;
import androidx.lifecycle.LifecycleOwner;
import java.lang.reflect.Field;
@RequiresApi(19)
/* loaded from: classes.dex */
final class ImmLeaksCleaner implements LifecycleEventObserver {
private static final int INIT_FAILED = 2;
private static final int INIT_SUCCESS = 1;
private static final int NOT_INITIALIAZED = 0;
private static Field sHField;
private static Field sNextServedViewField;
private static int sReflectedFieldsInitialized;
private static Field sServedViewField;
private Activity mActivity;
public ImmLeaksCleaner(Activity activity) {
this.mActivity = activity;
}
@Override // androidx.lifecycle.LifecycleEventObserver
public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.Event event) {
if (event != Lifecycle.Event.ON_DESTROY) {
return;
}
if (sReflectedFieldsInitialized == 0) {
initializeReflectiveFields();
}
if (sReflectedFieldsInitialized == 1) {
InputMethodManager inputMethodManager = (InputMethodManager) this.mActivity.getSystemService("input_method");
try {
Object obj = sHField.get(inputMethodManager);
if (obj == null) {
return;
}
synchronized (obj) {
try {
try {
try {
View view = (View) sServedViewField.get(inputMethodManager);
if (view == null) {
return;
}
if (view.isAttachedToWindow()) {
return;
}
try {
sNextServedViewField.set(inputMethodManager, null);
inputMethodManager.isActive();
} catch (IllegalAccessException unused) {
}
} catch (ClassCastException unused2) {
}
} catch (IllegalAccessException unused3) {
}
} catch (Throwable th) {
throw th;
}
}
} catch (IllegalAccessException unused4) {
}
}
}
@SuppressLint({"SoonBlockedPrivateApi"})
@MainThread
private static void initializeReflectiveFields() {
try {
sReflectedFieldsInitialized = 2;
Field declaredField = InputMethodManager.class.getDeclaredField("mServedView");
sServedViewField = declaredField;
declaredField.setAccessible(true);
Field declaredField2 = InputMethodManager.class.getDeclaredField("mNextServedView");
sNextServedViewField = declaredField2;
declaredField2.setAccessible(true);
Field declaredField3 = InputMethodManager.class.getDeclaredField("mH");
sHField = declaredField3;
declaredField3.setAccessible(true);
sReflectedFieldsInitialized = 1;
} catch (NoSuchFieldException unused) {
}
}
}

View File

@@ -0,0 +1,63 @@
package androidx.activity;
import androidx.annotation.MainThread;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nOnBackPressedCallback.kt\nKotlin\n*S Kotlin\n*F\n+ 1 OnBackPressedCallback.kt\nandroidx/activity/OnBackPressedCallback\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,85:1\n1855#2,2:86\n*S KotlinDebug\n*F\n+ 1 OnBackPressedCallback.kt\nandroidx/activity/OnBackPressedCallback\n*L\n67#1:86,2\n*E\n"})
/* loaded from: classes.dex */
public abstract class OnBackPressedCallback {
private final CopyOnWriteArrayList<Cancellable> cancellables = new CopyOnWriteArrayList<>();
private Function0 enabledChangedCallback;
private boolean isEnabled;
public final Function0 getEnabledChangedCallback$activity_release() {
return this.enabledChangedCallback;
}
@MainThread
public abstract void handleOnBackPressed();
@MainThread
public final boolean isEnabled() {
return this.isEnabled;
}
public final void setEnabledChangedCallback$activity_release(Function0 function0) {
this.enabledChangedCallback = function0;
}
public OnBackPressedCallback(boolean z) {
this.isEnabled = z;
}
@MainThread
public final void setEnabled(boolean z) {
this.isEnabled = z;
Function0 function0 = this.enabledChangedCallback;
if (function0 != null) {
function0.invoke();
}
}
public final void addCancellable(Cancellable cancellable) {
Intrinsics.checkNotNullParameter(cancellable, "cancellable");
this.cancellables.add(cancellable);
}
public final void removeCancellable(Cancellable cancellable) {
Intrinsics.checkNotNullParameter(cancellable, "cancellable");
this.cancellables.remove(cancellable);
}
@MainThread
public final void remove() {
Iterator<T> it = this.cancellables.iterator();
while (it.hasNext()) {
((Cancellable) it.next()).cancel();
}
}
}

View File

@@ -0,0 +1,289 @@
package androidx.activity;
import android.os.Build;
import android.window.OnBackInvokedCallback;
import android.window.OnBackInvokedDispatcher;
import androidx.activity.OnBackPressedDispatcher;
import androidx.annotation.DoNotInline;
import androidx.annotation.MainThread;
import androidx.annotation.RequiresApi;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleEventObserver;
import androidx.lifecycle.LifecycleOwner;
import java.util.Collection;
import java.util.Iterator;
import java.util.ListIterator;
import kotlin.Unit;
import kotlin.collections.ArrayDeque;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nOnBackPressedDispatcher.kt\nKotlin\n*S Kotlin\n*F\n+ 1 OnBackPressedDispatcher.kt\nandroidx/activity/OnBackPressedDispatcher\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,317:1\n1747#2,3:318\n533#2,6:321\n*S KotlinDebug\n*F\n+ 1 OnBackPressedDispatcher.kt\nandroidx/activity/OnBackPressedDispatcher\n*L\n194#1:318,3\n209#1:321,6\n*E\n"})
/* loaded from: classes.dex */
public final class OnBackPressedDispatcher {
private boolean backInvokedCallbackRegistered;
private Function0 enabledChangedCallback;
private final Runnable fallbackOnBackPressed;
private OnBackInvokedDispatcher invokedDispatcher;
private OnBackInvokedCallback onBackInvokedCallback;
private final ArrayDeque onBackPressedCallbacks;
/* JADX WARN: Multi-variable type inference failed */
public OnBackPressedDispatcher() {
this(null, 1, 0 == true ? 1 : 0);
}
public OnBackPressedDispatcher(Runnable runnable) {
this.fallbackOnBackPressed = runnable;
this.onBackPressedCallbacks = new ArrayDeque();
if (Build.VERSION.SDK_INT >= 33) {
this.enabledChangedCallback = new Function0() { // from class: androidx.activity.OnBackPressedDispatcher.1
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public /* bridge */ /* synthetic */ Object invoke() {
m4invoke();
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: collision with other method in class */
public final void m4invoke() {
OnBackPressedDispatcher.this.updateBackInvokedCallbackState$activity_release();
}
};
this.onBackInvokedCallback = Api33Impl.INSTANCE.createOnBackInvokedCallback(new Function0() { // from class: androidx.activity.OnBackPressedDispatcher.2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public /* bridge */ /* synthetic */ Object invoke() {
m5invoke();
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: collision with other method in class */
public final void m5invoke() {
OnBackPressedDispatcher.this.onBackPressed();
}
});
}
}
public /* synthetic */ OnBackPressedDispatcher(Runnable runnable, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : runnable);
}
@RequiresApi(33)
public final void setOnBackInvokedDispatcher(OnBackInvokedDispatcher invoker) {
Intrinsics.checkNotNullParameter(invoker, "invoker");
this.invokedDispatcher = invoker;
updateBackInvokedCallbackState$activity_release();
}
@RequiresApi(33)
public final void updateBackInvokedCallbackState$activity_release() {
boolean hasEnabledCallbacks = hasEnabledCallbacks();
OnBackInvokedDispatcher onBackInvokedDispatcher = this.invokedDispatcher;
OnBackInvokedCallback onBackInvokedCallback = this.onBackInvokedCallback;
if (onBackInvokedDispatcher == null || onBackInvokedCallback == null) {
return;
}
if (hasEnabledCallbacks && !this.backInvokedCallbackRegistered) {
Api33Impl.INSTANCE.registerOnBackInvokedCallback(onBackInvokedDispatcher, 0, onBackInvokedCallback);
this.backInvokedCallbackRegistered = true;
} else {
if (hasEnabledCallbacks || !this.backInvokedCallbackRegistered) {
return;
}
Api33Impl.INSTANCE.unregisterOnBackInvokedCallback(onBackInvokedDispatcher, onBackInvokedCallback);
this.backInvokedCallbackRegistered = false;
}
}
@MainThread
public final void addCallback(OnBackPressedCallback onBackPressedCallback) {
Intrinsics.checkNotNullParameter(onBackPressedCallback, "onBackPressedCallback");
addCancellableCallback$activity_release(onBackPressedCallback);
}
@MainThread
public final Cancellable addCancellableCallback$activity_release(OnBackPressedCallback onBackPressedCallback) {
Intrinsics.checkNotNullParameter(onBackPressedCallback, "onBackPressedCallback");
this.onBackPressedCallbacks.add(onBackPressedCallback);
OnBackPressedCancellable onBackPressedCancellable = new OnBackPressedCancellable(this, onBackPressedCallback);
onBackPressedCallback.addCancellable(onBackPressedCancellable);
if (Build.VERSION.SDK_INT >= 33) {
updateBackInvokedCallbackState$activity_release();
onBackPressedCallback.setEnabledChangedCallback$activity_release(this.enabledChangedCallback);
}
return onBackPressedCancellable;
}
@MainThread
public final void addCallback(LifecycleOwner owner, OnBackPressedCallback onBackPressedCallback) {
Intrinsics.checkNotNullParameter(owner, "owner");
Intrinsics.checkNotNullParameter(onBackPressedCallback, "onBackPressedCallback");
Lifecycle lifecycle = owner.getLifecycle();
if (lifecycle.getCurrentState() == Lifecycle.State.DESTROYED) {
return;
}
onBackPressedCallback.addCancellable(new LifecycleOnBackPressedCancellable(this, lifecycle, onBackPressedCallback));
if (Build.VERSION.SDK_INT >= 33) {
updateBackInvokedCallbackState$activity_release();
onBackPressedCallback.setEnabledChangedCallback$activity_release(this.enabledChangedCallback);
}
}
public final class OnBackPressedCancellable implements Cancellable {
private final OnBackPressedCallback onBackPressedCallback;
final /* synthetic */ OnBackPressedDispatcher this$0;
public OnBackPressedCancellable(OnBackPressedDispatcher onBackPressedDispatcher, OnBackPressedCallback onBackPressedCallback) {
Intrinsics.checkNotNullParameter(onBackPressedCallback, "onBackPressedCallback");
this.this$0 = onBackPressedDispatcher;
this.onBackPressedCallback = onBackPressedCallback;
}
@Override // androidx.activity.Cancellable
public void cancel() {
this.this$0.onBackPressedCallbacks.remove(this.onBackPressedCallback);
this.onBackPressedCallback.removeCancellable(this);
if (Build.VERSION.SDK_INT >= 33) {
this.onBackPressedCallback.setEnabledChangedCallback$activity_release(null);
this.this$0.updateBackInvokedCallbackState$activity_release();
}
}
}
public final class LifecycleOnBackPressedCancellable implements LifecycleEventObserver, Cancellable {
private Cancellable currentCancellable;
private final Lifecycle lifecycle;
private final OnBackPressedCallback onBackPressedCallback;
final /* synthetic */ OnBackPressedDispatcher this$0;
public LifecycleOnBackPressedCancellable(OnBackPressedDispatcher onBackPressedDispatcher, Lifecycle lifecycle, OnBackPressedCallback onBackPressedCallback) {
Intrinsics.checkNotNullParameter(lifecycle, "lifecycle");
Intrinsics.checkNotNullParameter(onBackPressedCallback, "onBackPressedCallback");
this.this$0 = onBackPressedDispatcher;
this.lifecycle = lifecycle;
this.onBackPressedCallback = onBackPressedCallback;
lifecycle.addObserver(this);
}
@Override // androidx.lifecycle.LifecycleEventObserver
public void onStateChanged(LifecycleOwner source, Lifecycle.Event event) {
Intrinsics.checkNotNullParameter(source, "source");
Intrinsics.checkNotNullParameter(event, "event");
if (event == Lifecycle.Event.ON_START) {
this.currentCancellable = this.this$0.addCancellableCallback$activity_release(this.onBackPressedCallback);
return;
}
if (event != Lifecycle.Event.ON_STOP) {
if (event == Lifecycle.Event.ON_DESTROY) {
cancel();
}
} else {
Cancellable cancellable = this.currentCancellable;
if (cancellable != null) {
cancellable.cancel();
}
}
}
@Override // androidx.activity.Cancellable
public void cancel() {
this.lifecycle.removeObserver(this);
this.onBackPressedCallback.removeCancellable(this);
Cancellable cancellable = this.currentCancellable;
if (cancellable != null) {
cancellable.cancel();
}
this.currentCancellable = null;
}
}
@RequiresApi(33)
public static final class Api33Impl {
public static final Api33Impl INSTANCE = new Api33Impl();
private Api33Impl() {
}
@DoNotInline
public final void registerOnBackInvokedCallback(Object dispatcher, int i, Object callback) {
Intrinsics.checkNotNullParameter(dispatcher, "dispatcher");
Intrinsics.checkNotNullParameter(callback, "callback");
((OnBackInvokedDispatcher) dispatcher).registerOnBackInvokedCallback(i, (OnBackInvokedCallback) callback);
}
@DoNotInline
public final void unregisterOnBackInvokedCallback(Object dispatcher, Object callback) {
Intrinsics.checkNotNullParameter(dispatcher, "dispatcher");
Intrinsics.checkNotNullParameter(callback, "callback");
((OnBackInvokedDispatcher) dispatcher).unregisterOnBackInvokedCallback((OnBackInvokedCallback) callback);
}
/* JADX INFO: Access modifiers changed from: private */
public static final void createOnBackInvokedCallback$lambda$0(Function0 onBackInvoked) {
Intrinsics.checkNotNullParameter(onBackInvoked, "$onBackInvoked");
onBackInvoked.invoke();
}
@DoNotInline
public final OnBackInvokedCallback createOnBackInvokedCallback(final Function0 onBackInvoked) {
Intrinsics.checkNotNullParameter(onBackInvoked, "onBackInvoked");
return new OnBackInvokedCallback() { // from class: androidx.activity.OnBackPressedDispatcher$Api33Impl$$ExternalSyntheticLambda0
public final void onBackInvoked() {
OnBackPressedDispatcher.Api33Impl.createOnBackInvokedCallback$lambda$0(Function0.this);
}
};
}
}
@MainThread
public final void onBackPressed() {
Object obj;
ArrayDeque arrayDeque = this.onBackPressedCallbacks;
ListIterator<E> listIterator = arrayDeque.listIterator(arrayDeque.size());
while (true) {
if (!listIterator.hasPrevious()) {
obj = null;
break;
} else {
obj = listIterator.previous();
if (((OnBackPressedCallback) obj).isEnabled()) {
break;
}
}
}
OnBackPressedCallback onBackPressedCallback = (OnBackPressedCallback) obj;
if (onBackPressedCallback != null) {
onBackPressedCallback.handleOnBackPressed();
return;
}
Runnable runnable = this.fallbackOnBackPressed;
if (runnable != null) {
runnable.run();
}
}
@MainThread
public final boolean hasEnabledCallbacks() {
ArrayDeque arrayDeque = this.onBackPressedCallbacks;
if ((arrayDeque instanceof Collection) && arrayDeque.isEmpty()) {
return false;
}
Iterator<E> it = arrayDeque.iterator();
while (it.hasNext()) {
if (((OnBackPressedCallback) it.next()).isEnabled()) {
return true;
}
}
return false;
}
}

View File

@@ -0,0 +1,35 @@
package androidx.activity;
import androidx.lifecycle.LifecycleOwner;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class OnBackPressedDispatcherKt {
public static /* synthetic */ OnBackPressedCallback addCallback$default(OnBackPressedDispatcher onBackPressedDispatcher, LifecycleOwner lifecycleOwner, boolean z, Function1 function1, int i, Object obj) {
if ((i & 1) != 0) {
lifecycleOwner = null;
}
if ((i & 2) != 0) {
z = true;
}
return addCallback(onBackPressedDispatcher, lifecycleOwner, z, function1);
}
public static final OnBackPressedCallback addCallback(OnBackPressedDispatcher onBackPressedDispatcher, LifecycleOwner lifecycleOwner, final boolean z, final Function1 onBackPressed) {
Intrinsics.checkNotNullParameter(onBackPressedDispatcher, "<this>");
Intrinsics.checkNotNullParameter(onBackPressed, "onBackPressed");
OnBackPressedCallback onBackPressedCallback = new OnBackPressedCallback(z) { // from class: androidx.activity.OnBackPressedDispatcherKt$addCallback$callback$1
@Override // androidx.activity.OnBackPressedCallback
public void handleOnBackPressed() {
onBackPressed.invoke(this);
}
};
if (lifecycleOwner != null) {
onBackPressedDispatcher.addCallback(lifecycleOwner, onBackPressedCallback);
} else {
onBackPressedDispatcher.addCallback(onBackPressedCallback);
}
return onBackPressedCallback;
}
}

View File

@@ -0,0 +1,8 @@
package androidx.activity;
import androidx.lifecycle.LifecycleOwner;
/* loaded from: classes.dex */
public interface OnBackPressedDispatcherOwner extends LifecycleOwner {
OnBackPressedDispatcher getOnBackPressedDispatcher();
}

View File

@@ -0,0 +1,16 @@
package androidx.activity;
/* loaded from: classes.dex */
public final class R {
public static final class id {
public static int report_drawn = 0x7f0a0242;
public static int view_tree_on_back_pressed_dispatcher_owner = 0x7f0a0291;
private id() {
}
}
private R() {
}
}

View File

@@ -0,0 +1,48 @@
package androidx.activity;
import android.view.View;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.sequences.Sequence;
import kotlin.sequences.SequencesKt__SequencesKt;
import kotlin.sequences.SequencesKt___SequencesKt;
/* loaded from: classes.dex */
public final class ViewTreeFullyDrawnReporterOwner {
public static final void set(View view, FullyDrawnReporterOwner fullyDrawnReporterOwner) {
Intrinsics.checkNotNullParameter(view, "<this>");
Intrinsics.checkNotNullParameter(fullyDrawnReporterOwner, "fullyDrawnReporterOwner");
view.setTag(R.id.report_drawn, fullyDrawnReporterOwner);
}
public static final FullyDrawnReporterOwner get(View view) {
Sequence generateSequence;
Sequence mapNotNull;
Object firstOrNull;
Intrinsics.checkNotNullParameter(view, "<this>");
generateSequence = SequencesKt__SequencesKt.generateSequence(view, new Function1() { // from class: androidx.activity.ViewTreeFullyDrawnReporterOwner$findViewTreeFullyDrawnReporterOwner$1
@Override // kotlin.jvm.functions.Function1
public final View invoke(View it) {
Intrinsics.checkNotNullParameter(it, "it");
Object parent = it.getParent();
if (parent instanceof View) {
return (View) parent;
}
return null;
}
});
mapNotNull = SequencesKt___SequencesKt.mapNotNull(generateSequence, new Function1() { // from class: androidx.activity.ViewTreeFullyDrawnReporterOwner$findViewTreeFullyDrawnReporterOwner$2
@Override // kotlin.jvm.functions.Function1
public final FullyDrawnReporterOwner invoke(View it) {
Intrinsics.checkNotNullParameter(it, "it");
Object tag = it.getTag(R.id.report_drawn);
if (tag instanceof FullyDrawnReporterOwner) {
return (FullyDrawnReporterOwner) tag;
}
return null;
}
});
firstOrNull = SequencesKt___SequencesKt.firstOrNull(mapNotNull);
return (FullyDrawnReporterOwner) firstOrNull;
}
}

View File

@@ -0,0 +1,48 @@
package androidx.activity;
import android.view.View;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.sequences.Sequence;
import kotlin.sequences.SequencesKt__SequencesKt;
import kotlin.sequences.SequencesKt___SequencesKt;
/* loaded from: classes.dex */
public final class ViewTreeOnBackPressedDispatcherOwner {
public static final void set(View view, OnBackPressedDispatcherOwner onBackPressedDispatcherOwner) {
Intrinsics.checkNotNullParameter(view, "<this>");
Intrinsics.checkNotNullParameter(onBackPressedDispatcherOwner, "onBackPressedDispatcherOwner");
view.setTag(R.id.view_tree_on_back_pressed_dispatcher_owner, onBackPressedDispatcherOwner);
}
public static final OnBackPressedDispatcherOwner get(View view) {
Sequence generateSequence;
Sequence mapNotNull;
Object firstOrNull;
Intrinsics.checkNotNullParameter(view, "<this>");
generateSequence = SequencesKt__SequencesKt.generateSequence(view, new Function1() { // from class: androidx.activity.ViewTreeOnBackPressedDispatcherOwner$findViewTreeOnBackPressedDispatcherOwner$1
@Override // kotlin.jvm.functions.Function1
public final View invoke(View it) {
Intrinsics.checkNotNullParameter(it, "it");
Object parent = it.getParent();
if (parent instanceof View) {
return (View) parent;
}
return null;
}
});
mapNotNull = SequencesKt___SequencesKt.mapNotNull(generateSequence, new Function1() { // from class: androidx.activity.ViewTreeOnBackPressedDispatcherOwner$findViewTreeOnBackPressedDispatcherOwner$2
@Override // kotlin.jvm.functions.Function1
public final OnBackPressedDispatcherOwner invoke(View it) {
Intrinsics.checkNotNullParameter(it, "it");
Object tag = it.getTag(R.id.view_tree_on_back_pressed_dispatcher_owner);
if (tag instanceof OnBackPressedDispatcherOwner) {
return (OnBackPressedDispatcherOwner) tag;
}
return null;
}
});
firstOrNull = SequencesKt___SequencesKt.firstOrNull(mapNotNull);
return (OnBackPressedDispatcherOwner) firstOrNull;
}
}

View File

@@ -0,0 +1,12 @@
package androidx.activity.contextaware;
import android.content.Context;
/* loaded from: classes.dex */
public interface ContextAware {
void addOnContextAvailableListener(OnContextAvailableListener onContextAvailableListener);
Context peekAvailableContext();
void removeOnContextAvailableListener(OnContextAvailableListener onContextAvailableListener);
}

View File

@@ -0,0 +1,44 @@
package androidx.activity.contextaware;
import android.content.Context;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class ContextAwareHelper {
private volatile Context context;
private final Set<OnContextAvailableListener> listeners = new CopyOnWriteArraySet();
public final void clearAvailableContext() {
this.context = null;
}
public final Context peekAvailableContext() {
return this.context;
}
public final void addOnContextAvailableListener(OnContextAvailableListener listener) {
Intrinsics.checkNotNullParameter(listener, "listener");
Context context = this.context;
if (context != null) {
listener.onContextAvailable(context);
}
this.listeners.add(listener);
}
public final void removeOnContextAvailableListener(OnContextAvailableListener listener) {
Intrinsics.checkNotNullParameter(listener, "listener");
this.listeners.remove(listener);
}
public final void dispatchOnContextAvailable(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
this.context = context;
Iterator<OnContextAvailableListener> it = this.listeners.iterator();
while (it.hasNext()) {
it.next().onContextAvailable(context);
}
}
}

View File

@@ -0,0 +1,30 @@
package androidx.activity.contextaware;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nContextAware.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ContextAware.kt\nandroidx/activity/contextaware/ContextAwareKt$withContextAvailable$2$1\n*L\n1#1,93:1\n*E\n"})
/* loaded from: classes.dex */
public final class ContextAwareKt$withContextAvailable$2$1 extends Lambda implements Function1 {
final /* synthetic */ ContextAwareKt$withContextAvailable$2$listener$1 $listener;
final /* synthetic */ ContextAware $this_withContextAvailable;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ContextAwareKt$withContextAvailable$2$1(ContextAware contextAware, ContextAwareKt$withContextAvailable$2$listener$1 contextAwareKt$withContextAvailable$2$listener$1) {
super(1);
this.$this_withContextAvailable = contextAware;
this.$listener = contextAwareKt$withContextAvailable$2$listener$1;
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((Throwable) obj);
return Unit.INSTANCE;
}
public final void invoke(Throwable th) {
this.$this_withContextAvailable.removeOnContextAvailableListener(this.$listener);
}
}

View File

@@ -0,0 +1,37 @@
package androidx.activity.contextaware;
import android.content.Context;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CancellableContinuation;
@SourceDebugExtension({"SMAP\nContextAware.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ContextAware.kt\nandroidx/activity/contextaware/ContextAwareKt$withContextAvailable$2$listener$1\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,93:1\n1#2:94\n*E\n"})
/* loaded from: classes.dex */
public final class ContextAwareKt$withContextAvailable$2$listener$1 implements OnContextAvailableListener {
final /* synthetic */ CancellableContinuation $co;
final /* synthetic */ Function1 $onContextAvailable;
public ContextAwareKt$withContextAvailable$2$listener$1(CancellableContinuation cancellableContinuation, Function1 function1) {
this.$co = cancellableContinuation;
this.$onContextAvailable = function1;
}
@Override // androidx.activity.contextaware.OnContextAvailableListener
public void onContextAvailable(Context context) {
Object m4060constructorimpl;
Intrinsics.checkNotNullParameter(context, "context");
CancellableContinuation cancellableContinuation = this.$co;
Function1 function1 = this.$onContextAvailable;
try {
Result.Companion companion = Result.Companion;
m4060constructorimpl = Result.m4060constructorimpl(function1.invoke(context));
} catch (Throwable th) {
Result.Companion companion2 = Result.Companion;
m4060constructorimpl = Result.m4060constructorimpl(ResultKt.createFailure(th));
}
cancellableContinuation.resumeWith(m4060constructorimpl);
}
}

View File

@@ -0,0 +1,61 @@
package androidx.activity.contextaware;
import android.content.Context;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugProbesKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.InlineMarker;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CancellableContinuationImpl;
@SourceDebugExtension({"SMAP\nContextAware.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ContextAware.kt\nandroidx/activity/contextaware/ContextAwareKt\n+ 2 CancellableContinuation.kt\nkotlinx/coroutines/CancellableContinuationKt\n*L\n1#1,93:1\n314#2,11:94\n*S KotlinDebug\n*F\n+ 1 ContextAware.kt\nandroidx/activity/contextaware/ContextAwareKt\n*L\n81#1:94,11\n*E\n"})
/* loaded from: classes.dex */
public final class ContextAwareKt {
public static final <R> Object withContextAvailable(ContextAware contextAware, Function1 function1, Continuation continuation) {
Continuation intercepted;
Object coroutine_suspended;
Context peekAvailableContext = contextAware.peekAvailableContext();
if (peekAvailableContext != null) {
return function1.invoke(peekAvailableContext);
}
intercepted = IntrinsicsKt__IntrinsicsJvmKt.intercepted(continuation);
CancellableContinuationImpl cancellableContinuationImpl = new CancellableContinuationImpl(intercepted, 1);
cancellableContinuationImpl.initCancellability();
ContextAwareKt$withContextAvailable$2$listener$1 contextAwareKt$withContextAvailable$2$listener$1 = new ContextAwareKt$withContextAvailable$2$listener$1(cancellableContinuationImpl, function1);
contextAware.addOnContextAvailableListener(contextAwareKt$withContextAvailable$2$listener$1);
cancellableContinuationImpl.invokeOnCancellation(new ContextAwareKt$withContextAvailable$2$1(contextAware, contextAwareKt$withContextAvailable$2$listener$1));
Object result = cancellableContinuationImpl.getResult();
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (result == coroutine_suspended) {
DebugProbesKt.probeCoroutineSuspended(continuation);
}
return result;
}
private static final <R> Object withContextAvailable$$forInline(ContextAware contextAware, Function1 function1, Continuation continuation) {
Continuation intercepted;
Object coroutine_suspended;
Context peekAvailableContext = contextAware.peekAvailableContext();
if (peekAvailableContext != null) {
return function1.invoke(peekAvailableContext);
}
InlineMarker.mark(0);
intercepted = IntrinsicsKt__IntrinsicsJvmKt.intercepted(continuation);
CancellableContinuationImpl cancellableContinuationImpl = new CancellableContinuationImpl(intercepted, 1);
cancellableContinuationImpl.initCancellability();
ContextAwareKt$withContextAvailable$2$listener$1 contextAwareKt$withContextAvailable$2$listener$1 = new ContextAwareKt$withContextAvailable$2$listener$1(cancellableContinuationImpl, function1);
contextAware.addOnContextAvailableListener(contextAwareKt$withContextAvailable$2$listener$1);
cancellableContinuationImpl.invokeOnCancellation(new ContextAwareKt$withContextAvailable$2$1(contextAware, contextAwareKt$withContextAvailable$2$listener$1));
Unit unit = Unit.INSTANCE;
Object result = cancellableContinuationImpl.getResult();
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (result == coroutine_suspended) {
DebugProbesKt.probeCoroutineSuspended(continuation);
}
InlineMarker.mark(1);
return result;
}
}

View File

@@ -0,0 +1,8 @@
package androidx.activity.contextaware;
import android.content.Context;
/* loaded from: classes.dex */
public interface OnContextAvailableListener {
void onContextAvailable(Context context);
}

View File

@@ -0,0 +1,75 @@
package androidx.activity.result;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@SuppressLint({"BanParcelableUsage"})
/* loaded from: classes.dex */
public final class ActivityResult implements Parcelable {
@NonNull
public static final Parcelable.Creator<ActivityResult> CREATOR = new Parcelable.Creator<ActivityResult>() { // from class: androidx.activity.result.ActivityResult.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public ActivityResult createFromParcel(@NonNull Parcel parcel) {
return new ActivityResult(parcel);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public ActivityResult[] newArray(int i) {
return new ActivityResult[i];
}
};
@Nullable
private final Intent mData;
private final int mResultCode;
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
@Nullable
public Intent getData() {
return this.mData;
}
public int getResultCode() {
return this.mResultCode;
}
public ActivityResult(int i, @Nullable Intent intent) {
this.mResultCode = i;
this.mData = intent;
}
public ActivityResult(Parcel parcel) {
this.mResultCode = parcel.readInt();
this.mData = parcel.readInt() == 0 ? null : (Intent) Intent.CREATOR.createFromParcel(parcel);
}
public String toString() {
return "ActivityResult{resultCode=" + resultCodeToString(this.mResultCode) + ", data=" + this.mData + '}';
}
@NonNull
public static String resultCodeToString(int i) {
return i != -1 ? i != 0 ? String.valueOf(i) : "RESULT_CANCELED" : "RESULT_OK";
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
parcel.writeInt(this.mResultCode);
parcel.writeInt(this.mData == null ? 0 : 1);
Intent intent = this.mData;
if (intent != null) {
intent.writeToParcel(parcel, i);
}
}
}

View File

@@ -0,0 +1,6 @@
package androidx.activity.result;
/* loaded from: classes.dex */
public interface ActivityResultCallback<O> {
void onActivityResult(O o);
}

View File

@@ -0,0 +1,13 @@
package androidx.activity.result;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.annotation.NonNull;
/* loaded from: classes.dex */
public interface ActivityResultCaller {
@NonNull
<I, O> ActivityResultLauncher<I> registerForActivityResult(@NonNull ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultCallback<O> activityResultCallback);
@NonNull
<I, O> ActivityResultLauncher<I> registerForActivityResult(@NonNull ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultRegistry activityResultRegistry, @NonNull ActivityResultCallback<O> activityResultCallback);
}

View File

@@ -0,0 +1,23 @@
package androidx.activity.result;
import android.annotation.SuppressLint;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.ActivityOptionsCompat;
/* loaded from: classes.dex */
public abstract class ActivityResultLauncher<I> {
@NonNull
public abstract ActivityResultContract<I, ?> getContract();
public abstract void launch(@SuppressLint({"UnknownNullness"}) I i, @Nullable ActivityOptionsCompat activityOptionsCompat);
@MainThread
public abstract void unregister();
public void launch(@SuppressLint({"UnknownNullness"}) I i) {
launch(i, null);
}
}

View File

@@ -0,0 +1,300 @@
package androidx.activity.result;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.ActivityOptionsCompat;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleEventObserver;
import androidx.lifecycle.LifecycleOwner;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
/* loaded from: classes.dex */
public abstract class ActivityResultRegistry {
private static final int INITIAL_REQUEST_CODE_VALUE = 65536;
private static final String KEY_COMPONENT_ACTIVITY_LAUNCHED_KEYS = "KEY_COMPONENT_ACTIVITY_LAUNCHED_KEYS";
private static final String KEY_COMPONENT_ACTIVITY_PENDING_RESULTS = "KEY_COMPONENT_ACTIVITY_PENDING_RESULT";
private static final String KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT = "KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT";
private static final String KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS = "KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS";
private static final String KEY_COMPONENT_ACTIVITY_REGISTERED_RCS = "KEY_COMPONENT_ACTIVITY_REGISTERED_RCS";
private static final String LOG_TAG = "ActivityResultRegistry";
private Random mRandom = new Random();
private final Map<Integer, String> mRcToKey = new HashMap();
final Map<String, Integer> mKeyToRc = new HashMap();
private final Map<String, LifecycleContainer> mKeyToLifecycleContainers = new HashMap();
ArrayList<String> mLaunchedKeys = new ArrayList<>();
final transient Map<String, CallbackAndContract<?>> mKeyToCallback = new HashMap();
final Map<String, Object> mParsedPendingResults = new HashMap();
final Bundle mPendingResults = new Bundle();
@MainThread
public abstract <I, O> void onLaunch(int i, @NonNull ActivityResultContract<I, O> activityResultContract, @SuppressLint({"UnknownNullness"}) I i2, @Nullable ActivityOptionsCompat activityOptionsCompat);
@NonNull
public final <I, O> ActivityResultLauncher<I> register(@NonNull final String str, @NonNull LifecycleOwner lifecycleOwner, @NonNull final ActivityResultContract<I, O> activityResultContract, @NonNull final ActivityResultCallback<O> activityResultCallback) {
Lifecycle lifecycle = lifecycleOwner.getLifecycle();
if (lifecycle.getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
throw new IllegalStateException("LifecycleOwner " + lifecycleOwner + " is attempting to register while current state is " + lifecycle.getCurrentState() + ". LifecycleOwners must call register before they are STARTED.");
}
registerKey(str);
LifecycleContainer lifecycleContainer = this.mKeyToLifecycleContainers.get(str);
if (lifecycleContainer == null) {
lifecycleContainer = new LifecycleContainer(lifecycle);
}
lifecycleContainer.addObserver(new LifecycleEventObserver() { // from class: androidx.activity.result.ActivityResultRegistry.1
@Override // androidx.lifecycle.LifecycleEventObserver
public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner2, @NonNull Lifecycle.Event event) {
if (Lifecycle.Event.ON_START.equals(event)) {
ActivityResultRegistry.this.mKeyToCallback.put(str, new CallbackAndContract<>(activityResultCallback, activityResultContract));
if (ActivityResultRegistry.this.mParsedPendingResults.containsKey(str)) {
Object obj = ActivityResultRegistry.this.mParsedPendingResults.get(str);
ActivityResultRegistry.this.mParsedPendingResults.remove(str);
activityResultCallback.onActivityResult(obj);
}
ActivityResult activityResult = (ActivityResult) ActivityResultRegistry.this.mPendingResults.getParcelable(str);
if (activityResult != null) {
ActivityResultRegistry.this.mPendingResults.remove(str);
activityResultCallback.onActivityResult(activityResultContract.parseResult(activityResult.getResultCode(), activityResult.getData()));
return;
}
return;
}
if (Lifecycle.Event.ON_STOP.equals(event)) {
ActivityResultRegistry.this.mKeyToCallback.remove(str);
} else if (Lifecycle.Event.ON_DESTROY.equals(event)) {
ActivityResultRegistry.this.unregister(str);
}
}
});
this.mKeyToLifecycleContainers.put(str, lifecycleContainer);
return new ActivityResultLauncher<I>() { // from class: androidx.activity.result.ActivityResultRegistry.2
@Override // androidx.activity.result.ActivityResultLauncher
@NonNull
public ActivityResultContract<I, ?> getContract() {
return activityResultContract;
}
@Override // androidx.activity.result.ActivityResultLauncher
public void launch(I i, @Nullable ActivityOptionsCompat activityOptionsCompat) {
Integer num = ActivityResultRegistry.this.mKeyToRc.get(str);
if (num == null) {
throw new IllegalStateException("Attempting to launch an unregistered ActivityResultLauncher with contract " + activityResultContract + " and input " + i + ". You must ensure the ActivityResultLauncher is registered before calling launch().");
}
ActivityResultRegistry.this.mLaunchedKeys.add(str);
try {
ActivityResultRegistry.this.onLaunch(num.intValue(), activityResultContract, i, activityOptionsCompat);
} catch (Exception e) {
ActivityResultRegistry.this.mLaunchedKeys.remove(str);
throw e;
}
}
@Override // androidx.activity.result.ActivityResultLauncher
public void unregister() {
ActivityResultRegistry.this.unregister(str);
}
};
}
/* JADX WARN: Multi-variable type inference failed */
@NonNull
public final <I, O> ActivityResultLauncher<I> register(@NonNull final String str, @NonNull final ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultCallback<O> activityResultCallback) {
registerKey(str);
this.mKeyToCallback.put(str, new CallbackAndContract<>(activityResultCallback, activityResultContract));
if (this.mParsedPendingResults.containsKey(str)) {
Object obj = this.mParsedPendingResults.get(str);
this.mParsedPendingResults.remove(str);
activityResultCallback.onActivityResult(obj);
}
ActivityResult activityResult = (ActivityResult) this.mPendingResults.getParcelable(str);
if (activityResult != null) {
this.mPendingResults.remove(str);
activityResultCallback.onActivityResult(activityResultContract.parseResult(activityResult.getResultCode(), activityResult.getData()));
}
return new ActivityResultLauncher<I>() { // from class: androidx.activity.result.ActivityResultRegistry.3
@Override // androidx.activity.result.ActivityResultLauncher
@NonNull
public ActivityResultContract<I, ?> getContract() {
return activityResultContract;
}
@Override // androidx.activity.result.ActivityResultLauncher
public void launch(I i, @Nullable ActivityOptionsCompat activityOptionsCompat) {
Integer num = ActivityResultRegistry.this.mKeyToRc.get(str);
if (num == null) {
throw new IllegalStateException("Attempting to launch an unregistered ActivityResultLauncher with contract " + activityResultContract + " and input " + i + ". You must ensure the ActivityResultLauncher is registered before calling launch().");
}
ActivityResultRegistry.this.mLaunchedKeys.add(str);
try {
ActivityResultRegistry.this.onLaunch(num.intValue(), activityResultContract, i, activityOptionsCompat);
} catch (Exception e) {
ActivityResultRegistry.this.mLaunchedKeys.remove(str);
throw e;
}
}
@Override // androidx.activity.result.ActivityResultLauncher
public void unregister() {
ActivityResultRegistry.this.unregister(str);
}
};
}
@MainThread
public final void unregister(@NonNull String str) {
Integer remove;
if (!this.mLaunchedKeys.contains(str) && (remove = this.mKeyToRc.remove(str)) != null) {
this.mRcToKey.remove(remove);
}
this.mKeyToCallback.remove(str);
if (this.mParsedPendingResults.containsKey(str)) {
Log.w(LOG_TAG, "Dropping pending result for request " + str + ": " + this.mParsedPendingResults.get(str));
this.mParsedPendingResults.remove(str);
}
if (this.mPendingResults.containsKey(str)) {
Log.w(LOG_TAG, "Dropping pending result for request " + str + ": " + this.mPendingResults.getParcelable(str));
this.mPendingResults.remove(str);
}
LifecycleContainer lifecycleContainer = this.mKeyToLifecycleContainers.get(str);
if (lifecycleContainer != null) {
lifecycleContainer.clearObservers();
this.mKeyToLifecycleContainers.remove(str);
}
}
public final void onSaveInstanceState(@NonNull Bundle bundle) {
bundle.putIntegerArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_RCS, new ArrayList<>(this.mKeyToRc.values()));
bundle.putStringArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS, new ArrayList<>(this.mKeyToRc.keySet()));
bundle.putStringArrayList(KEY_COMPONENT_ACTIVITY_LAUNCHED_KEYS, new ArrayList<>(this.mLaunchedKeys));
bundle.putBundle(KEY_COMPONENT_ACTIVITY_PENDING_RESULTS, (Bundle) this.mPendingResults.clone());
bundle.putSerializable(KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT, this.mRandom);
}
public final void onRestoreInstanceState(@Nullable Bundle bundle) {
if (bundle == null) {
return;
}
ArrayList<Integer> integerArrayList = bundle.getIntegerArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_RCS);
ArrayList<String> stringArrayList = bundle.getStringArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS);
if (stringArrayList == null || integerArrayList == null) {
return;
}
this.mLaunchedKeys = bundle.getStringArrayList(KEY_COMPONENT_ACTIVITY_LAUNCHED_KEYS);
this.mRandom = (Random) bundle.getSerializable(KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT);
this.mPendingResults.putAll(bundle.getBundle(KEY_COMPONENT_ACTIVITY_PENDING_RESULTS));
for (int i = 0; i < stringArrayList.size(); i++) {
String str = stringArrayList.get(i);
if (this.mKeyToRc.containsKey(str)) {
Integer remove = this.mKeyToRc.remove(str);
if (!this.mPendingResults.containsKey(str)) {
this.mRcToKey.remove(remove);
}
}
bindRcKey(integerArrayList.get(i).intValue(), stringArrayList.get(i));
}
}
@MainThread
public final boolean dispatchResult(int i, int i2, @Nullable Intent intent) {
String str = this.mRcToKey.get(Integer.valueOf(i));
if (str == null) {
return false;
}
doDispatch(str, i2, intent, this.mKeyToCallback.get(str));
return true;
}
@MainThread
public final <O> boolean dispatchResult(int i, @SuppressLint({"UnknownNullness"}) O o) {
ActivityResultCallback<?> activityResultCallback;
String str = this.mRcToKey.get(Integer.valueOf(i));
if (str == null) {
return false;
}
CallbackAndContract<?> callbackAndContract = this.mKeyToCallback.get(str);
if (callbackAndContract == null || (activityResultCallback = callbackAndContract.mCallback) == null) {
this.mPendingResults.remove(str);
this.mParsedPendingResults.put(str, o);
return true;
}
if (!this.mLaunchedKeys.remove(str)) {
return true;
}
activityResultCallback.onActivityResult(o);
return true;
}
private <O> void doDispatch(String str, int i, @Nullable Intent intent, @Nullable CallbackAndContract<O> callbackAndContract) {
if (callbackAndContract != null && callbackAndContract.mCallback != null && this.mLaunchedKeys.contains(str)) {
callbackAndContract.mCallback.onActivityResult(callbackAndContract.mContract.parseResult(i, intent));
this.mLaunchedKeys.remove(str);
} else {
this.mParsedPendingResults.remove(str);
this.mPendingResults.putParcelable(str, new ActivityResult(i, intent));
}
}
private void registerKey(String str) {
if (this.mKeyToRc.get(str) != null) {
return;
}
bindRcKey(generateRandomNumber(), str);
}
private int generateRandomNumber() {
int nextInt = this.mRandom.nextInt(2147418112);
while (true) {
int i = nextInt + 65536;
if (!this.mRcToKey.containsKey(Integer.valueOf(i))) {
return i;
}
nextInt = this.mRandom.nextInt(2147418112);
}
}
private void bindRcKey(int i, String str) {
this.mRcToKey.put(Integer.valueOf(i), str);
this.mKeyToRc.put(str, Integer.valueOf(i));
}
public static class CallbackAndContract<O> {
final ActivityResultCallback<O> mCallback;
final ActivityResultContract<?, O> mContract;
public CallbackAndContract(ActivityResultCallback<O> activityResultCallback, ActivityResultContract<?, O> activityResultContract) {
this.mCallback = activityResultCallback;
this.mContract = activityResultContract;
}
}
public static class LifecycleContainer {
final Lifecycle mLifecycle;
private final ArrayList<LifecycleEventObserver> mObservers = new ArrayList<>();
public LifecycleContainer(@NonNull Lifecycle lifecycle) {
this.mLifecycle = lifecycle;
}
public void addObserver(@NonNull LifecycleEventObserver lifecycleEventObserver) {
this.mLifecycle.addObserver(lifecycleEventObserver);
this.mObservers.add(lifecycleEventObserver);
}
public void clearObservers() {
Iterator<LifecycleEventObserver> it = this.mObservers.iterator();
while (it.hasNext()) {
this.mLifecycle.removeObserver(it.next());
}
this.mObservers.clear();
}
}
}

View File

@@ -0,0 +1,6 @@
package androidx.activity.result;
/* loaded from: classes.dex */
public interface ActivityResultRegistryOwner {
ActivityResultRegistry getActivityResultRegistry();
}

View File

@@ -0,0 +1,166 @@
package androidx.activity.result;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Parcel;
import android.os.Parcelable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@SuppressLint({"BanParcelableUsage"})
/* loaded from: classes.dex */
public final class IntentSenderRequest implements Parcelable {
private final Intent fillInIntent;
private final int flagsMask;
private final int flagsValues;
private final IntentSender intentSender;
public static final Companion Companion = new Companion(null);
public static final Parcelable.Creator<IntentSenderRequest> CREATOR = new Parcelable.Creator<IntentSenderRequest>() { // from class: androidx.activity.result.IntentSenderRequest$Companion$CREATOR$1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public IntentSenderRequest createFromParcel(Parcel inParcel) {
Intrinsics.checkNotNullParameter(inParcel, "inParcel");
return new IntentSenderRequest(inParcel);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public IntentSenderRequest[] newArray(int i) {
return new IntentSenderRequest[i];
}
};
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public final Intent getFillInIntent() {
return this.fillInIntent;
}
public final int getFlagsMask() {
return this.flagsMask;
}
public final int getFlagsValues() {
return this.flagsValues;
}
public final IntentSender getIntentSender() {
return this.intentSender;
}
public IntentSenderRequest(IntentSender intentSender, Intent intent, int i, int i2) {
Intrinsics.checkNotNullParameter(intentSender, "intentSender");
this.intentSender = intentSender;
this.fillInIntent = intent;
this.flagsMask = i;
this.flagsValues = i2;
}
public /* synthetic */ IntentSenderRequest(IntentSender intentSender, Intent intent, int i, int i2, int i3, DefaultConstructorMarker defaultConstructorMarker) {
this(intentSender, (i3 & 2) != 0 ? null : intent, (i3 & 4) != 0 ? 0 : i, (i3 & 8) != 0 ? 0 : i2);
}
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public IntentSenderRequest(android.os.Parcel r4) {
/*
r3 = this;
java.lang.String r0 = "parcel"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r4, r0)
java.lang.Class<android.content.IntentSender> r0 = android.content.IntentSender.class
java.lang.ClassLoader r0 = r0.getClassLoader()
android.os.Parcelable r0 = r4.readParcelable(r0)
kotlin.jvm.internal.Intrinsics.checkNotNull(r0)
android.content.IntentSender r0 = (android.content.IntentSender) r0
java.lang.Class<android.content.Intent> r1 = android.content.Intent.class
java.lang.ClassLoader r1 = r1.getClassLoader()
android.os.Parcelable r1 = r4.readParcelable(r1)
android.content.Intent r1 = (android.content.Intent) r1
int r2 = r4.readInt()
int r4 = r4.readInt()
r3.<init>(r0, r1, r2, r4)
return
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.activity.result.IntentSenderRequest.<init>(android.os.Parcel):void");
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel dest, int i) {
Intrinsics.checkNotNullParameter(dest, "dest");
dest.writeParcelable(this.intentSender, i);
dest.writeParcelable(this.fillInIntent, i);
dest.writeInt(this.flagsMask);
dest.writeInt(this.flagsValues);
}
public static final class Builder {
private Intent fillInIntent;
private int flagsMask;
private int flagsValues;
private final IntentSender intentSender;
@Retention(RetentionPolicy.SOURCE)
public @interface Flag {
}
public final Builder setFillInIntent(Intent intent) {
this.fillInIntent = intent;
return this;
}
public final Builder setFlags(int i, int i2) {
this.flagsValues = i;
this.flagsMask = i2;
return this;
}
public Builder(IntentSender intentSender) {
Intrinsics.checkNotNullParameter(intentSender, "intentSender");
this.intentSender = intentSender;
}
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public Builder(android.app.PendingIntent r2) {
/*
r1 = this;
java.lang.String r0 = "pendingIntent"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r2, r0)
android.content.IntentSender r2 = r2.getIntentSender()
java.lang.String r0 = "pendingIntent.intentSender"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r2, r0)
r1.<init>(r2)
return
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.activity.result.IntentSenderRequest.Builder.<init>(android.app.PendingIntent):void");
}
public final IntentSenderRequest build() {
return new IntentSenderRequest(this.intentSender, this.fillInIntent, this.flagsMask, this.flagsValues);
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static /* synthetic */ void getCREATOR$annotations() {
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,34 @@
package androidx.activity.result;
import androidx.activity.result.contract.ActivityResultContracts;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class PickVisualMediaRequest {
private ActivityResultContracts.PickVisualMedia.VisualMediaType mediaType = ActivityResultContracts.PickVisualMedia.ImageAndVideo.INSTANCE;
public final ActivityResultContracts.PickVisualMedia.VisualMediaType getMediaType() {
return this.mediaType;
}
public final void setMediaType$activity_release(ActivityResultContracts.PickVisualMedia.VisualMediaType visualMediaType) {
Intrinsics.checkNotNullParameter(visualMediaType, "<set-?>");
this.mediaType = visualMediaType;
}
public static final class Builder {
private ActivityResultContracts.PickVisualMedia.VisualMediaType mediaType = ActivityResultContracts.PickVisualMedia.ImageAndVideo.INSTANCE;
public final Builder setMediaType(ActivityResultContracts.PickVisualMedia.VisualMediaType mediaType) {
Intrinsics.checkNotNullParameter(mediaType, "mediaType");
this.mediaType = mediaType;
return this;
}
public final PickVisualMediaRequest build() {
PickVisualMediaRequest pickVisualMediaRequest = new PickVisualMediaRequest();
pickVisualMediaRequest.setMediaType$activity_release(this.mediaType);
return pickVisualMediaRequest;
}
}
}

View File

@@ -0,0 +1,20 @@
package androidx.activity.result;
import androidx.activity.result.PickVisualMediaRequest;
import androidx.activity.result.contract.ActivityResultContracts;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class PickVisualMediaRequestKt {
public static /* synthetic */ PickVisualMediaRequest PickVisualMediaRequest$default(ActivityResultContracts.PickVisualMedia.VisualMediaType visualMediaType, int i, Object obj) {
if ((i & 1) != 0) {
visualMediaType = ActivityResultContracts.PickVisualMedia.ImageAndVideo.INSTANCE;
}
return PickVisualMediaRequest(visualMediaType);
}
public static final PickVisualMediaRequest PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.VisualMediaType mediaType) {
Intrinsics.checkNotNullParameter(mediaType, "mediaType");
return new PickVisualMediaRequest.Builder().setMediaType(mediaType).build();
}
}

View File

@@ -0,0 +1,29 @@
package androidx.activity.result.contract;
import android.content.Context;
import android.content.Intent;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public abstract class ActivityResultContract<I, O> {
public abstract Intent createIntent(Context context, I i);
public SynchronousResult<O> getSynchronousResult(Context context, I i) {
Intrinsics.checkNotNullParameter(context, "context");
return null;
}
public abstract O parseResult(int i, Intent intent);
public static final class SynchronousResult<T> {
private final T value;
public final T getValue() {
return this.value;
}
public SynchronousResult(T t) {
this.value = t;
}
}
}

View File

@@ -0,0 +1,5 @@
package androidx.activity.result.contract;
/* loaded from: classes.dex */
public abstract /* synthetic */ class ActivityResultContracts$PickMultipleVisualMedia$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,5 @@
package androidx.activity.result.contract;
/* loaded from: classes.dex */
public abstract /* synthetic */ class ActivityResultContracts$PickVisualMedia$Companion$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,917 @@
package androidx.activity.result.contract;
import android.annotation.SuppressLint;
import android.content.ClipData;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.ext.SdkExtensions;
import android.provider.MediaStore;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.IntentSenderRequest;
import androidx.activity.result.PickVisualMediaRequest;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.annotation.CallSuper;
import androidx.annotation.RequiresApi;
import androidx.core.content.ContextCompat;
import com.google.ar.core.ImageMetadata;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.collections.ArraysKt___ArraysKt;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.collections.MapsKt__MapsJVMKt;
import kotlin.collections.MapsKt__MapsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.ranges.RangesKt___RangesKt;
/* loaded from: classes.dex */
public final class ActivityResultContracts {
private ActivityResultContracts() {
}
public static final class StartActivityForResult extends ActivityResultContract<Intent, ActivityResult> {
public static final Companion Companion = new Companion(null);
public static final String EXTRA_ACTIVITY_OPTIONS_BUNDLE = "androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE";
@Override // androidx.activity.result.contract.ActivityResultContract
public Intent createIntent(Context context, Intent input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return input;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public ActivityResult parseResult(int i, Intent intent) {
return new ActivityResult(i, intent);
}
}
public static final class StartIntentSenderForResult extends ActivityResultContract<IntentSenderRequest, ActivityResult> {
public static final String ACTION_INTENT_SENDER_REQUEST = "androidx.activity.result.contract.action.INTENT_SENDER_REQUEST";
public static final Companion Companion = new Companion(null);
public static final String EXTRA_INTENT_SENDER_REQUEST = "androidx.activity.result.contract.extra.INTENT_SENDER_REQUEST";
public static final String EXTRA_SEND_INTENT_EXCEPTION = "androidx.activity.result.contract.extra.SEND_INTENT_EXCEPTION";
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
@Override // androidx.activity.result.contract.ActivityResultContract
public Intent createIntent(Context context, IntentSenderRequest input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
Intent putExtra = new Intent(ACTION_INTENT_SENDER_REQUEST).putExtra(EXTRA_INTENT_SENDER_REQUEST, input);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(ACTION_INTENT_SEN…NT_SENDER_REQUEST, input)");
return putExtra;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public ActivityResult parseResult(int i, Intent intent) {
return new ActivityResult(i, intent);
}
}
@SourceDebugExtension({"SMAP\nActivityResultContracts.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$RequestMultiplePermissions\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,959:1\n12541#2,2:960\n8676#2,2:962\n9358#2,4:964\n11365#2:968\n11700#2,3:969\n*S KotlinDebug\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$RequestMultiplePermissions\n*L\n188#1:960,2\n195#1:962,2\n195#1:964,4\n208#1:968\n208#1:969,3\n*E\n"})
public static final class RequestMultiplePermissions extends ActivityResultContract<String[], Map<String, Boolean>> {
public static final String ACTION_REQUEST_PERMISSIONS = "androidx.activity.result.contract.action.REQUEST_PERMISSIONS";
public static final Companion Companion = new Companion(null);
public static final String EXTRA_PERMISSIONS = "androidx.activity.result.contract.extra.PERMISSIONS";
public static final String EXTRA_PERMISSION_GRANT_RESULTS = "androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS";
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final Intent createIntent$activity_release(String[] input) {
Intrinsics.checkNotNullParameter(input, "input");
Intent putExtra = new Intent(RequestMultiplePermissions.ACTION_REQUEST_PERMISSIONS).putExtra(RequestMultiplePermissions.EXTRA_PERMISSIONS, input);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(ACTION_REQUEST_PE…EXTRA_PERMISSIONS, input)");
return putExtra;
}
}
@Override // androidx.activity.result.contract.ActivityResultContract
public Intent createIntent(Context context, String[] input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return Companion.createIntent$activity_release(input);
}
@Override // androidx.activity.result.contract.ActivityResultContract
public ActivityResultContract.SynchronousResult<Map<String, Boolean>> getSynchronousResult(Context context, String[] input) {
int mapCapacity;
int coerceAtLeast;
Map emptyMap;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
if (input.length == 0) {
emptyMap = MapsKt__MapsKt.emptyMap();
return new ActivityResultContract.SynchronousResult<>(emptyMap);
}
for (String str : input) {
if (ContextCompat.checkSelfPermission(context, str) != 0) {
return null;
}
}
mapCapacity = MapsKt__MapsJVMKt.mapCapacity(input.length);
coerceAtLeast = RangesKt___RangesKt.coerceAtLeast(mapCapacity, 16);
LinkedHashMap linkedHashMap = new LinkedHashMap(coerceAtLeast);
for (String str2 : input) {
Pair pair = TuplesKt.to(str2, Boolean.TRUE);
linkedHashMap.put(pair.getFirst(), pair.getSecond());
}
return new ActivityResultContract.SynchronousResult<>(linkedHashMap);
}
@Override // androidx.activity.result.contract.ActivityResultContract
public Map<String, Boolean> parseResult(int i, Intent intent) {
Map<String, Boolean> emptyMap;
List filterNotNull;
List zip;
Map<String, Boolean> map;
Map<String, Boolean> emptyMap2;
Map<String, Boolean> emptyMap3;
if (i != -1) {
emptyMap3 = MapsKt__MapsKt.emptyMap();
return emptyMap3;
}
if (intent == null) {
emptyMap2 = MapsKt__MapsKt.emptyMap();
return emptyMap2;
}
String[] stringArrayExtra = intent.getStringArrayExtra(EXTRA_PERMISSIONS);
int[] intArrayExtra = intent.getIntArrayExtra(EXTRA_PERMISSION_GRANT_RESULTS);
if (intArrayExtra == null || stringArrayExtra == null) {
emptyMap = MapsKt__MapsKt.emptyMap();
return emptyMap;
}
ArrayList arrayList = new ArrayList(intArrayExtra.length);
for (int i2 : intArrayExtra) {
arrayList.add(Boolean.valueOf(i2 == 0));
}
filterNotNull = ArraysKt___ArraysKt.filterNotNull(stringArrayExtra);
zip = CollectionsKt___CollectionsKt.zip(filterNotNull, arrayList);
map = MapsKt__MapsKt.toMap(zip);
return map;
}
}
@SourceDebugExtension({"SMAP\nActivityResultContracts.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$RequestPermission\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,959:1\n12774#2,2:960\n*S KotlinDebug\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$RequestPermission\n*L\n228#1:960,2\n*E\n"})
public static final class RequestPermission extends ActivityResultContract<String, Boolean> {
@Override // androidx.activity.result.contract.ActivityResultContract
public Intent createIntent(Context context, String input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return RequestMultiplePermissions.Companion.createIntent$activity_release(new String[]{input});
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public Boolean parseResult(int i, Intent intent) {
if (intent == null || i != -1) {
return Boolean.FALSE;
}
int[] intArrayExtra = intent.getIntArrayExtra(RequestMultiplePermissions.EXTRA_PERMISSION_GRANT_RESULTS);
boolean z = false;
if (intArrayExtra != null) {
int length = intArrayExtra.length;
int i2 = 0;
while (true) {
if (i2 >= length) {
break;
}
if (intArrayExtra[i2] == 0) {
z = true;
break;
}
i2++;
}
}
return Boolean.valueOf(z);
}
@Override // androidx.activity.result.contract.ActivityResultContract
public ActivityResultContract.SynchronousResult<Boolean> getSynchronousResult(Context context, String input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
if (ContextCompat.checkSelfPermission(context, input) == 0) {
return new ActivityResultContract.SynchronousResult<>(Boolean.TRUE);
}
return null;
}
}
@SourceDebugExtension({"SMAP\nActivityResultContracts.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$TakePicturePreview\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,959:1\n1#2:960\n*E\n"})
public static class TakePicturePreview extends ActivityResultContract<Void, Bitmap> {
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<Bitmap> getSynchronousResult(Context context, Void r2) {
Intrinsics.checkNotNullParameter(context, "context");
return null;
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, Void r2) {
Intrinsics.checkNotNullParameter(context, "context");
return new Intent("android.media.action.IMAGE_CAPTURE");
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public final Bitmap parseResult(int i, Intent intent) {
if (i != -1) {
intent = null;
}
if (intent != null) {
return (Bitmap) intent.getParcelableExtra("data");
}
return null;
}
}
public static class TakePicture extends ActivityResultContract<Uri, Boolean> {
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<Boolean> getSynchronousResult(Context context, Uri input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return null;
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, Uri input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
Intent putExtra = new Intent("android.media.action.IMAGE_CAPTURE").putExtra("output", input);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(MediaStore.ACTION…tore.EXTRA_OUTPUT, input)");
return putExtra;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public final Boolean parseResult(int i, Intent intent) {
return Boolean.valueOf(i == -1);
}
}
@SourceDebugExtension({"SMAP\nActivityResultContracts.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$TakeVideo\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,959:1\n1#2:960\n*E\n"})
public static class TakeVideo extends ActivityResultContract<Uri, Bitmap> {
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<Bitmap> getSynchronousResult(Context context, Uri input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return null;
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, Uri input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
Intent putExtra = new Intent("android.media.action.VIDEO_CAPTURE").putExtra("output", input);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(MediaStore.ACTION…tore.EXTRA_OUTPUT, input)");
return putExtra;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public final Bitmap parseResult(int i, Intent intent) {
if (i != -1) {
intent = null;
}
if (intent != null) {
return (Bitmap) intent.getParcelableExtra("data");
}
return null;
}
}
public static class CaptureVideo extends ActivityResultContract<Uri, Boolean> {
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<Boolean> getSynchronousResult(Context context, Uri input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return null;
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, Uri input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
Intent putExtra = new Intent("android.media.action.VIDEO_CAPTURE").putExtra("output", input);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(MediaStore.ACTION…tore.EXTRA_OUTPUT, input)");
return putExtra;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public final Boolean parseResult(int i, Intent intent) {
return Boolean.valueOf(i == -1);
}
}
@SourceDebugExtension({"SMAP\nActivityResultContracts.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$PickContact\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,959:1\n1#2:960\n*E\n"})
public static final class PickContact extends ActivityResultContract<Void, Uri> {
@Override // androidx.activity.result.contract.ActivityResultContract
public Intent createIntent(Context context, Void r2) {
Intrinsics.checkNotNullParameter(context, "context");
Intent type = new Intent("android.intent.action.PICK").setType("vnd.android.cursor.dir/contact");
Intrinsics.checkNotNullExpressionValue(type, "Intent(Intent.ACTION_PIC…ct.Contacts.CONTENT_TYPE)");
return type;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public Uri parseResult(int i, Intent intent) {
if (i != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
}
@SourceDebugExtension({"SMAP\nActivityResultContracts.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$GetContent\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,959:1\n1#2:960\n*E\n"})
public static class GetContent extends ActivityResultContract<String, Uri> {
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<Uri> getSynchronousResult(Context context, String input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return null;
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, String input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
Intent type = new Intent("android.intent.action.GET_CONTENT").addCategory("android.intent.category.OPENABLE").setType(input);
Intrinsics.checkNotNullExpressionValue(type, "Intent(Intent.ACTION_GET… .setType(input)");
return type;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public final Uri parseResult(int i, Intent intent) {
if (i != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
}
@RequiresApi(18)
public static class GetMultipleContents extends ActivityResultContract<String, List<Uri>> {
public static final Companion Companion = new Companion(null);
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<List<Uri>> getSynchronousResult(Context context, String input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return null;
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, String input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
Intent putExtra = new Intent("android.intent.action.GET_CONTENT").addCategory("android.intent.category.OPENABLE").setType(input).putExtra("android.intent.extra.ALLOW_MULTIPLE", true);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(Intent.ACTION_GET…TRA_ALLOW_MULTIPLE, true)");
return putExtra;
}
@Override // androidx.activity.result.contract.ActivityResultContract
public final List<Uri> parseResult(int i, Intent intent) {
List<Uri> clipDataUris$activity_release;
if (i != -1) {
intent = null;
}
return (intent == null || (clipDataUris$activity_release = Companion.getClipDataUris$activity_release(intent)) == null) ? CollectionsKt__CollectionsKt.emptyList() : clipDataUris$activity_release;
}
@RequiresApi(18)
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final List<Uri> getClipDataUris$activity_release(Intent intent) {
Intrinsics.checkNotNullParameter(intent, "<this>");
LinkedHashSet linkedHashSet = new LinkedHashSet();
Uri data = intent.getData();
if (data != null) {
linkedHashSet.add(data);
}
ClipData clipData = intent.getClipData();
if (clipData == null && linkedHashSet.isEmpty()) {
return CollectionsKt__CollectionsKt.emptyList();
}
if (clipData != null) {
int itemCount = clipData.getItemCount();
for (int i = 0; i < itemCount; i++) {
Uri uri = clipData.getItemAt(i).getUri();
if (uri != null) {
linkedHashSet.add(uri);
}
}
}
return new ArrayList(linkedHashSet);
}
}
}
@RequiresApi(19)
@SourceDebugExtension({"SMAP\nActivityResultContracts.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$OpenDocument\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,959:1\n1#2:960\n*E\n"})
public static class OpenDocument extends ActivityResultContract<String[], Uri> {
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<Uri> getSynchronousResult(Context context, String[] input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return null;
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, String[] input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
Intent type = new Intent("android.intent.action.OPEN_DOCUMENT").putExtra("android.intent.extra.MIME_TYPES", input).setType("*/*");
Intrinsics.checkNotNullExpressionValue(type, "Intent(Intent.ACTION_OPE… .setType(\"*/*\")");
return type;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public final Uri parseResult(int i, Intent intent) {
if (i != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
}
@RequiresApi(19)
public static class OpenMultipleDocuments extends ActivityResultContract<String[], List<Uri>> {
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<List<Uri>> getSynchronousResult(Context context, String[] input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return null;
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, String[] input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
Intent type = new Intent("android.intent.action.OPEN_DOCUMENT").putExtra("android.intent.extra.MIME_TYPES", input).putExtra("android.intent.extra.ALLOW_MULTIPLE", true).setType("*/*");
Intrinsics.checkNotNullExpressionValue(type, "Intent(Intent.ACTION_OPE… .setType(\"*/*\")");
return type;
}
@Override // androidx.activity.result.contract.ActivityResultContract
public final List<Uri> parseResult(int i, Intent intent) {
List<Uri> clipDataUris$activity_release;
if (i != -1) {
intent = null;
}
return (intent == null || (clipDataUris$activity_release = GetMultipleContents.Companion.getClipDataUris$activity_release(intent)) == null) ? CollectionsKt__CollectionsKt.emptyList() : clipDataUris$activity_release;
}
}
@RequiresApi(21)
@SourceDebugExtension({"SMAP\nActivityResultContracts.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$OpenDocumentTree\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,959:1\n1#2:960\n*E\n"})
public static class OpenDocumentTree extends ActivityResultContract<Uri, Uri> {
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<Uri> getSynchronousResult(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
return null;
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
Intent intent = new Intent("android.intent.action.OPEN_DOCUMENT_TREE");
if (uri != null) {
intent.putExtra("android.provider.extra.INITIAL_URI", uri);
}
return intent;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public final Uri parseResult(int i, Intent intent) {
if (i != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
}
@RequiresApi(19)
@SourceDebugExtension({"SMAP\nActivityResultContracts.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$CreateDocument\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,959:1\n1#2:960\n*E\n"})
public static class CreateDocument extends ActivityResultContract<String, Uri> {
private final String mimeType;
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<Uri> getSynchronousResult(Context context, String input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return null;
}
public CreateDocument(String mimeType) {
Intrinsics.checkNotNullParameter(mimeType, "mimeType");
this.mimeType = mimeType;
}
public CreateDocument() {
this("*/*");
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, String input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
Intent putExtra = new Intent("android.intent.action.CREATE_DOCUMENT").setType(this.mimeType).putExtra("android.intent.extra.TITLE", input);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(Intent.ACTION_CRE…ntent.EXTRA_TITLE, input)");
return putExtra;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public final Uri parseResult(int i, Intent intent) {
if (i != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
}
@RequiresApi(19)
@SourceDebugExtension({"SMAP\nActivityResultContracts.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ActivityResultContracts.kt\nandroidx/activity/result/contract/ActivityResultContracts$PickVisualMedia\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,959:1\n1#2:960\n*E\n"})
public static class PickVisualMedia extends ActivityResultContract<PickVisualMediaRequest, Uri> {
public static final String ACTION_SYSTEM_FALLBACK_PICK_IMAGES = "androidx.activity.result.contract.action.PICK_IMAGES";
public static final Companion Companion = new Companion(null);
public static final String EXTRA_SYSTEM_FALLBACK_PICK_IMAGES_MAX = "androidx.activity.result.contract.extra.PICK_IMAGES_MAX";
public static final String GMS_ACTION_PICK_IMAGES = "com.google.android.gms.provider.action.PICK_IMAGES";
public static final String GMS_EXTRA_PICK_IMAGES_MAX = "com.google.android.gms.provider.extra.PICK_IMAGES_MAX";
public interface VisualMediaType {
}
@SuppressLint({"ClassVerificationFailure", "NewApi"})
public static final boolean isPhotoPickerAvailable() {
return Companion.isPhotoPickerAvailable();
}
@SuppressLint({"ClassVerificationFailure", "NewApi"})
public static final boolean isPhotoPickerAvailable(Context context) {
return Companion.isPhotoPickerAvailable(context);
}
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<Uri> getSynchronousResult(Context context, PickVisualMediaRequest input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return null;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static /* synthetic */ void getACTION_SYSTEM_FALLBACK_PICK_IMAGES$annotations() {
}
public static /* synthetic */ void getEXTRA_SYSTEM_FALLBACK_PICK_IMAGES_MAX$annotations() {
}
private Companion() {
}
@SuppressLint({"ClassVerificationFailure", "NewApi"})
public final boolean isPhotoPickerAvailable() {
return isSystemPickerAvailable$activity_release();
}
@SuppressLint({"ClassVerificationFailure", "NewApi"})
public final boolean isPhotoPickerAvailable(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return isSystemPickerAvailable$activity_release() || isSystemFallbackPickerAvailable$activity_release(context) || isGmsPickerAvailable$activity_release(context);
}
@SuppressLint({"ClassVerificationFailure", "NewApi"})
public final boolean isSystemPickerAvailable$activity_release() {
int extensionVersion;
int i = Build.VERSION.SDK_INT;
if (i >= 33) {
return true;
}
if (i >= 30) {
extensionVersion = SdkExtensions.getExtensionVersion(30);
if (extensionVersion >= 2) {
return true;
}
}
return false;
}
public final boolean isSystemFallbackPickerAvailable$activity_release(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return getSystemFallbackPicker$activity_release(context) != null;
}
public final ResolveInfo getSystemFallbackPicker$activity_release(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return context.getPackageManager().resolveActivity(new Intent(PickVisualMedia.ACTION_SYSTEM_FALLBACK_PICK_IMAGES), ImageMetadata.STATISTICS_FACE_DETECT_MODE);
}
public final boolean isGmsPickerAvailable$activity_release(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return getGmsPicker$activity_release(context) != null;
}
public final ResolveInfo getGmsPicker$activity_release(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return context.getPackageManager().resolveActivity(new Intent(PickVisualMedia.GMS_ACTION_PICK_IMAGES), ImageMetadata.STATISTICS_FACE_DETECT_MODE);
}
public final String getVisualMimeType$activity_release(VisualMediaType input) {
Intrinsics.checkNotNullParameter(input, "input");
if (input instanceof ImageOnly) {
return "image/*";
}
if (input instanceof VideoOnly) {
return "video/*";
}
if (input instanceof SingleMimeType) {
return ((SingleMimeType) input).getMimeType();
}
if (input instanceof ImageAndVideo) {
return null;
}
throw new NoWhenBranchMatchedException();
}
}
public static final class ImageOnly implements VisualMediaType {
public static final ImageOnly INSTANCE = new ImageOnly();
private ImageOnly() {
}
}
public static final class VideoOnly implements VisualMediaType {
public static final VideoOnly INSTANCE = new VideoOnly();
private VideoOnly() {
}
}
public static final class ImageAndVideo implements VisualMediaType {
public static final ImageAndVideo INSTANCE = new ImageAndVideo();
private ImageAndVideo() {
}
}
public static final class SingleMimeType implements VisualMediaType {
private final String mimeType;
public final String getMimeType() {
return this.mimeType;
}
public SingleMimeType(String mimeType) {
Intrinsics.checkNotNullParameter(mimeType, "mimeType");
this.mimeType = mimeType;
}
}
@Override // androidx.activity.result.contract.ActivityResultContract
@CallSuper
public Intent createIntent(Context context, PickVisualMediaRequest input) {
Intent intent;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
Companion companion = Companion;
if (companion.isSystemPickerAvailable$activity_release()) {
Intent intent2 = new Intent("android.provider.action.PICK_IMAGES");
intent2.setType(companion.getVisualMimeType$activity_release(input.getMediaType()));
return intent2;
}
if (companion.isSystemFallbackPickerAvailable$activity_release(context)) {
ResolveInfo systemFallbackPicker$activity_release = companion.getSystemFallbackPicker$activity_release(context);
if (systemFallbackPicker$activity_release == null) {
throw new IllegalStateException("Required value was null.".toString());
}
ActivityInfo activityInfo = systemFallbackPicker$activity_release.activityInfo;
intent = new Intent(ACTION_SYSTEM_FALLBACK_PICK_IMAGES);
intent.setClassName(activityInfo.applicationInfo.packageName, activityInfo.name);
intent.setType(companion.getVisualMimeType$activity_release(input.getMediaType()));
} else if (companion.isGmsPickerAvailable$activity_release(context)) {
ResolveInfo gmsPicker$activity_release = companion.getGmsPicker$activity_release(context);
if (gmsPicker$activity_release == null) {
throw new IllegalStateException("Required value was null.".toString());
}
ActivityInfo activityInfo2 = gmsPicker$activity_release.activityInfo;
intent = new Intent(GMS_ACTION_PICK_IMAGES);
intent.setClassName(activityInfo2.applicationInfo.packageName, activityInfo2.name);
intent.setType(companion.getVisualMimeType$activity_release(input.getMediaType()));
} else {
Intent intent3 = new Intent("android.intent.action.OPEN_DOCUMENT");
intent3.setType(companion.getVisualMimeType$activity_release(input.getMediaType()));
if (intent3.getType() != null) {
return intent3;
}
intent3.setType("*/*");
intent3.putExtra("android.intent.extra.MIME_TYPES", new String[]{"image/*", "video/*"});
return intent3;
}
return intent;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.activity.result.contract.ActivityResultContract
public final Uri parseResult(int i, Intent intent) {
Object firstOrNull;
if (i != -1) {
intent = null;
}
if (intent == null) {
return null;
}
Uri data = intent.getData();
if (data == null) {
firstOrNull = CollectionsKt___CollectionsKt.firstOrNull((List) GetMultipleContents.Companion.getClipDataUris$activity_release(intent));
data = (Uri) firstOrNull;
}
return data;
}
}
@RequiresApi(19)
public static class PickMultipleVisualMedia extends ActivityResultContract<PickVisualMediaRequest, List<Uri>> {
public static final Companion Companion = new Companion(null);
private final int maxItems;
public PickMultipleVisualMedia() {
this(0, 1, null);
}
@Override // androidx.activity.result.contract.ActivityResultContract
public final ActivityResultContract.SynchronousResult<List<Uri>> getSynchronousResult(Context context, PickVisualMediaRequest input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return null;
}
public /* synthetic */ PickMultipleVisualMedia(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? Companion.getMaxItems$activity_release() : i);
}
public PickMultipleVisualMedia(int i) {
this.maxItems = i;
if (i <= 1) {
throw new IllegalArgumentException("Max items must be higher than 1".toString());
}
}
@Override // androidx.activity.result.contract.ActivityResultContract
@SuppressLint({"NewApi", "ClassVerificationFailure"})
@CallSuper
public Intent createIntent(Context context, PickVisualMediaRequest input) {
int pickImagesMaxLimit;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
PickVisualMedia.Companion companion = PickVisualMedia.Companion;
if (companion.isSystemPickerAvailable$activity_release()) {
Intent intent = new Intent("android.provider.action.PICK_IMAGES");
intent.setType(companion.getVisualMimeType$activity_release(input.getMediaType()));
int i = this.maxItems;
pickImagesMaxLimit = MediaStore.getPickImagesMaxLimit();
if (i > pickImagesMaxLimit) {
throw new IllegalArgumentException("Max items must be less or equals MediaStore.getPickImagesMaxLimit()".toString());
}
intent.putExtra("android.provider.extra.PICK_IMAGES_MAX", this.maxItems);
return intent;
}
if (companion.isSystemFallbackPickerAvailable$activity_release(context)) {
ResolveInfo systemFallbackPicker$activity_release = companion.getSystemFallbackPicker$activity_release(context);
if (systemFallbackPicker$activity_release == null) {
throw new IllegalStateException("Required value was null.".toString());
}
ActivityInfo activityInfo = systemFallbackPicker$activity_release.activityInfo;
Intent intent2 = new Intent(PickVisualMedia.ACTION_SYSTEM_FALLBACK_PICK_IMAGES);
intent2.setClassName(activityInfo.applicationInfo.packageName, activityInfo.name);
intent2.setType(companion.getVisualMimeType$activity_release(input.getMediaType()));
intent2.putExtra(PickVisualMedia.GMS_EXTRA_PICK_IMAGES_MAX, this.maxItems);
return intent2;
}
if (companion.isGmsPickerAvailable$activity_release(context)) {
ResolveInfo gmsPicker$activity_release = companion.getGmsPicker$activity_release(context);
if (gmsPicker$activity_release == null) {
throw new IllegalStateException("Required value was null.".toString());
}
ActivityInfo activityInfo2 = gmsPicker$activity_release.activityInfo;
Intent intent3 = new Intent(PickVisualMedia.GMS_ACTION_PICK_IMAGES);
intent3.setClassName(activityInfo2.applicationInfo.packageName, activityInfo2.name);
intent3.putExtra(PickVisualMedia.GMS_EXTRA_PICK_IMAGES_MAX, this.maxItems);
return intent3;
}
Intent intent4 = new Intent("android.intent.action.OPEN_DOCUMENT");
intent4.setType(companion.getVisualMimeType$activity_release(input.getMediaType()));
intent4.putExtra("android.intent.extra.ALLOW_MULTIPLE", true);
if (intent4.getType() != null) {
return intent4;
}
intent4.setType("*/*");
intent4.putExtra("android.intent.extra.MIME_TYPES", new String[]{"image/*", "video/*"});
return intent4;
}
@Override // androidx.activity.result.contract.ActivityResultContract
public final List<Uri> parseResult(int i, Intent intent) {
List<Uri> clipDataUris$activity_release;
if (i != -1) {
intent = null;
}
return (intent == null || (clipDataUris$activity_release = GetMultipleContents.Companion.getClipDataUris$activity_release(intent)) == null) ? CollectionsKt__CollectionsKt.emptyList() : clipDataUris$activity_release;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
@SuppressLint({"NewApi", "ClassVerificationFailure"})
public final int getMaxItems$activity_release() {
int pickImagesMaxLimit;
if (!PickVisualMedia.Companion.isSystemPickerAvailable$activity_release()) {
return Integer.MAX_VALUE;
}
pickImagesMaxLimit = MediaStore.getPickImagesMaxLimit();
return pickImagesMaxLimit;
}
}
}
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface AnimRes {
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface AnimatorRes {
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface AnyRes {
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.ANNOTATION_TYPE})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface AnyThread {
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface ArrayRes {
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface AttrRes {
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.ANNOTATION_TYPE})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface BinderThread {
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface BoolRes {
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.METHOD})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface CallSuper {
}

View File

@@ -0,0 +1,15 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.METHOD})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface CheckResult {
String suggest() default "";
}

View File

@@ -0,0 +1,23 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.METHOD})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface ChecksSdkIntAtLeast {
int api() default -1;
String codename() default "";
int extension() default 0;
int lambda() default -1;
int parameter() default -1;
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
@Documented
@Retention(RetentionPolicy.CLASS)
/* loaded from: classes.dex */
public @interface ColorInt {
}

View File

@@ -0,0 +1,14 @@
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
@Documented
@Retention(RetentionPolicy.SOURCE)
/* loaded from: classes.dex */
public @interface ColorLong {
}

Some files were not shown because too many files have changed in this diff Show More