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 readTypedObject(Parcel parcel, Parcelable.Creator creator) { if (parcel.readInt() != 0) { return creator.createFromParcel(parcel); } return null; } /* JADX INFO: Access modifiers changed from: private */ public static void writeTypedObject(Parcel parcel, T t, int i) { if (t != null) { parcel.writeInt(1); t.writeToParcel(parcel, i); } else { parcel.writeInt(0); } } } }