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.RemoteException; /* loaded from: classes.dex */ public interface IResultReceiver extends IInterface { public static abstract class Stub extends Binder implements IResultReceiver { private static class Proxy implements IResultReceiver { private IBinder a; Proxy(IBinder iBinder) { this.a = iBinder; } @Override // android.support.v4.os.IResultReceiver public void a(int i, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.os.IResultReceiver"); obtain.writeInt(i); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.a.transact(1, obtain, null, 1); } finally { obtain.recycle(); } } @Override // android.os.IInterface public IBinder asBinder() { return this.a; } } public Stub() { attachInterface(this, "android.support.v4.os.IResultReceiver"); } public static IResultReceiver a(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface("android.support.v4.os.IResultReceiver"); return (queryLocalInterface == null || !(queryLocalInterface instanceof IResultReceiver)) ? new Proxy(iBinder) : (IResultReceiver) queryLocalInterface; } @Override // android.os.IInterface public IBinder asBinder() { return this; } @Override // android.os.Binder public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { if (i == 1) { parcel.enforceInterface("android.support.v4.os.IResultReceiver"); a(parcel.readInt(), parcel.readInt() != 0 ? (Bundle) Bundle.CREATOR.createFromParcel(parcel) : null); return true; } if (i != 1598968902) { return super.onTransact(i, parcel, parcel2, i2); } parcel2.writeString("android.support.v4.os.IResultReceiver"); return true; } } void a(int i, Bundle bundle) throws RemoteException; }