Rabbit-R1/android (non root)/java/sources/android/support/v4/os/IResultReceiver2.java
2024-05-21 17:08:36 -04:00

123 lines
4 KiB
Java

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 kotlin.text.Typography;
/* loaded from: classes.dex */
public interface IResultReceiver2 extends IInterface {
public static final String DESCRIPTOR = "android$support$v4$os$IResultReceiver2".replace(Typography.dollar, '.');
/* loaded from: classes.dex */
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;
/* loaded from: classes.dex */
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, DESCRIPTOR);
}
public static IResultReceiver2 asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(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 = 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);
}
/* loaded from: classes.dex */
private static class Proxy implements IResultReceiver2 {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
public String getInterfaceDescriptor() {
return DESCRIPTOR;
}
@Override // android.support.v4.os.IResultReceiver2
public void send(int i, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(DESCRIPTOR);
obtain.writeInt(i);
_Parcel.writeTypedObject(obtain, bundle, 0);
this.mRemote.transact(1, obtain, null, 1);
} finally {
obtain.recycle();
}
}
}
}
/* loaded from: classes.dex */
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);
}
}
}
}