mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-13 09:27:16 +01:00
113 lines
4 KiB
Java
113 lines
4 KiB
Java
package amazon.speech.simclient.event;
|
|
|
|
import android.os.Binder;
|
|
import android.os.IBinder;
|
|
import android.os.IInterface;
|
|
import android.os.Parcel;
|
|
import android.os.RemoteException;
|
|
import rx.Single$$ExternalSyntheticBUOutline0;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes.dex */
|
|
public interface IEventCallback extends IInterface {
|
|
void onResult(String str) throws RemoteException;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static abstract class Stub extends Binder implements IEventCallback {
|
|
private static final String DESCRIPTOR = "amazon.speech.simclient.event.IEventCallback";
|
|
static final int TRANSACTION_onResult = 1;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static class Proxy implements IEventCallback {
|
|
public static IEventCallback sDefaultImpl;
|
|
private IBinder mRemote;
|
|
|
|
public Proxy(IBinder iBinder) {
|
|
this.mRemote = iBinder;
|
|
}
|
|
|
|
@Override // android.os.IInterface
|
|
public IBinder asBinder() {
|
|
return this.mRemote;
|
|
}
|
|
|
|
public String getInterfaceDescriptor() {
|
|
return Stub.DESCRIPTOR;
|
|
}
|
|
|
|
@Override // amazon.speech.simclient.event.IEventCallback
|
|
public void onResult(String str) throws RemoteException {
|
|
Parcel obtain = Parcel.obtain();
|
|
try {
|
|
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
|
|
obtain.writeString(str);
|
|
if (this.mRemote.transact(1, obtain, null, 1) || Stub.getDefaultImpl() == null) {
|
|
return;
|
|
}
|
|
Stub.getDefaultImpl().onResult(str);
|
|
} finally {
|
|
obtain.recycle();
|
|
}
|
|
}
|
|
}
|
|
|
|
public Stub() {
|
|
attachInterface(this, DESCRIPTOR);
|
|
}
|
|
|
|
public static IEventCallback asInterface(IBinder iBinder) {
|
|
if (iBinder == null) {
|
|
return null;
|
|
}
|
|
IInterface queryLocalInterface = iBinder.queryLocalInterface(DESCRIPTOR);
|
|
return (queryLocalInterface == null || !(queryLocalInterface instanceof IEventCallback)) ? new Proxy(iBinder) : (IEventCallback) queryLocalInterface;
|
|
}
|
|
|
|
public static IEventCallback getDefaultImpl() {
|
|
return Proxy.sDefaultImpl;
|
|
}
|
|
|
|
public static boolean setDefaultImpl(IEventCallback iEventCallback) {
|
|
if (Proxy.sDefaultImpl != null) {
|
|
Single$$ExternalSyntheticBUOutline0.m$2("setDefaultImpl() called twice");
|
|
return false;
|
|
}
|
|
if (iEventCallback == null) {
|
|
return false;
|
|
}
|
|
Proxy.sDefaultImpl = iEventCallback;
|
|
return true;
|
|
}
|
|
|
|
@Override // android.os.Binder
|
|
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
|
|
if (i == 1) {
|
|
parcel.enforceInterface(DESCRIPTOR);
|
|
onResult(parcel.readString());
|
|
return true;
|
|
}
|
|
if (i != 1598968902) {
|
|
return super.onTransact(i, parcel, parcel2, i2);
|
|
}
|
|
parcel2.writeString(DESCRIPTOR);
|
|
return true;
|
|
}
|
|
|
|
@Override // android.os.IInterface
|
|
public IBinder asBinder() {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static class Default implements IEventCallback {
|
|
@Override // android.os.IInterface
|
|
public IBinder asBinder() {
|
|
return null;
|
|
}
|
|
|
|
@Override // amazon.speech.simclient.event.IEventCallback
|
|
public void onResult(String str) throws RemoteException {
|
|
}
|
|
}
|
|
}
|