package com.vivo.vms; 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 com.vivo.vms.IPCCallback; public interface IPCInvoke extends IInterface { public static class Default implements IPCInvoke { public IBinder asBinder() { return null; } @Override // com.vivo.vms.IPCInvoke public Bundle asyncCall(Bundle bundle, IPCCallback iPCCallback) throws RemoteException { return null; } } Bundle asyncCall(Bundle bundle, IPCCallback iPCCallback) throws RemoteException; public static abstract class Stub extends Binder implements IPCInvoke { private static final String DESCRIPTOR = "com.vivo.vms.IPCInvoke"; static final int TRANSACTION_asyncCall = 1; public IBinder asBinder() { return this; } public Stub() { attachInterface(this, DESCRIPTOR); } public static IPCInvoke asInterface(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface(DESCRIPTOR); if (queryLocalInterface == null || !(queryLocalInterface instanceof IPCInvoke)) { return new Proxy(iBinder); } return (IPCInvoke) queryLocalInterface; } @Override // android.os.Binder public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { if (i == 1) { parcel.enforceInterface(DESCRIPTOR); Bundle asyncCall = asyncCall(parcel.readInt() != 0 ? (Bundle) Bundle.CREATOR.createFromParcel(parcel) : null, IPCCallback.Stub.asInterface(parcel.readStrongBinder())); parcel2.writeNoException(); if (asyncCall != null) { parcel2.writeInt(1); asyncCall.writeToParcel(parcel2, 1); } else { parcel2.writeInt(0); } return true; } else if (i != 1598968902) { return super.onTransact(i, parcel, parcel2, i2); } else { parcel2.writeString(DESCRIPTOR); return true; } } /* access modifiers changed from: private */ public static class Proxy implements IPCInvoke { public static IPCInvoke sDefaultImpl; private IBinder mRemote; public String getInterfaceDescriptor() { return Stub.DESCRIPTOR; } Proxy(IBinder iBinder) { this.mRemote = iBinder; } public IBinder asBinder() { return this.mRemote; } @Override // com.vivo.vms.IPCInvoke public Bundle asyncCall(Bundle bundle, IPCCallback iPCCallback) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken(Stub.DESCRIPTOR); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } Bundle bundle2 = null; obtain.writeStrongBinder(iPCCallback != null ? iPCCallback.asBinder() : null); if (!this.mRemote.transact(1, obtain, obtain2, 0) && Stub.getDefaultImpl() != null) { return Stub.getDefaultImpl().asyncCall(bundle, iPCCallback); } obtain2.readException(); if (obtain2.readInt() != 0) { bundle2 = (Bundle) Bundle.CREATOR.createFromParcel(obtain2); } obtain2.recycle(); obtain.recycle(); return bundle2; } finally { obtain2.recycle(); obtain.recycle(); } } } public static boolean setDefaultImpl(IPCInvoke iPCInvoke) { if (Proxy.sDefaultImpl != null || iPCInvoke == null) { return false; } Proxy.sDefaultImpl = iPCInvoke; return true; } public static IPCInvoke getDefaultImpl() { return Proxy.sDefaultImpl; } } }