package com.baidu.speech.aidl; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import com.baidu.speech.aidl.EventManager; public interface EventManagerFactory extends IInterface { public static abstract class Stub extends Binder implements EventManagerFactory { private static final String DESCRIPTOR = "com.baidu.speech.aidl.EventManagerFactory"; public static final int TRANSACTION_create = 1; public static class Proxy implements EventManagerFactory { private IBinder mRemote; public Proxy(IBinder iBinder) { this.mRemote = iBinder; } public IBinder asBinder() { return this.mRemote; } @Override // com.baidu.speech.aidl.EventManagerFactory public EventManager create(String str) { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken(Stub.DESCRIPTOR); obtain.writeString(str); this.mRemote.transact(1, obtain, obtain2, 0); obtain2.readException(); return EventManager.Stub.asInterface(obtain2.readStrongBinder()); } finally { obtain2.recycle(); obtain.recycle(); } } public String getInterfaceDescriptor() { return Stub.DESCRIPTOR; } } public Stub() { attachInterface(this, DESCRIPTOR); } public static EventManagerFactory asInterface(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface(DESCRIPTOR); return (queryLocalInterface == null || !(queryLocalInterface instanceof EventManagerFactory)) ? new Proxy(iBinder) : (EventManagerFactory) queryLocalInterface; } public IBinder asBinder() { return this; } @Override // android.os.Binder public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) { if (i == 1) { parcel.enforceInterface(DESCRIPTOR); EventManager create = create(parcel.readString()); parcel2.writeNoException(); parcel2.writeStrongBinder(create != null ? create.asBinder() : null); return true; } else if (i != 1598968902) { return super.onTransact(i, parcel, parcel2, i2); } else { parcel2.writeString(DESCRIPTOR); return true; } } } EventManager create(String str); }