导航菜单

页面标题

页面副标题

Petal Maps v4.7.0.310001 - IAsrService.java 源代码

正在查看: Petal Maps v4.7.0.310001 应用的 IAsrService.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.huawei.hiai.asr;

import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;

public interface IAsrService extends IInterface {
    void cancel(IAsrListener iAsrListener) throws RemoteException;

    void cancelVoiceDetect(IAsrListener iAsrListener) throws RemoteException;

    void cancelWithIntent(Intent intent, IAsrListener iAsrListener) throws RemoteException;

    boolean checkServerVersion(int i) throws RemoteException;

    void destroy(IAsrListener iAsrListener) throws RemoteException;

    void finalDestroy() throws RemoteException;

    void init(Intent intent, IAsrListener iAsrListener) throws RemoteException;

    void setParameter(Intent intent, IAsrListener iAsrListener) throws RemoteException;

    void startListening(Intent intent, IAsrListener iAsrListener) throws RemoteException;

    void startVoiceDetect(Intent intent, IAsrListener iAsrListener) throws RemoteException;

    void stopListening(IAsrListener iAsrListener) throws RemoteException;

    void stopListeningWithIntent(Intent intent, IAsrListener iAsrListener) throws RemoteException;

    void updateLexicon(Intent intent, IAsrListener iAsrListener) throws RemoteException;

    void updateParams(Intent intent, IAsrListener iAsrListener) throws RemoteException;

    void writePcm(byte[] bArr, int i, IAsrListener iAsrListener) throws RemoteException;

    void writePcmWithIntent(Intent intent, byte[] bArr, int i) throws RemoteException;

    public static abstract class a extends Binder implements IAsrService {

        public static class C0017a implements IAsrService {
            public static IAsrService b;
            private IBinder a;

            public C0017a(IBinder iBinder) {
                this.a = iBinder;
            }

            @Override
            public IBinder asBinder() {
                return this.a;
            }

            @Override
            public void cancel(IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(6, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().cancel(iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void cancelVoiceDetect(IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(10, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().cancelVoiceDetect(iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void cancelWithIntent(Intent intent, IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    if (intent != null) {
                        obtain.writeInt(1);
                        intent.writeToParcel(obtain, 0);
                    } else {
                        obtain.writeInt(0);
                    }
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(16, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().cancelWithIntent(intent, iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public boolean checkServerVersion(int i) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    obtain.writeInt(i);
                    if (!this.a.transact(8, obtain, obtain2, 0) && a.a() != null) {
                        return a.a().checkServerVersion(i);
                    }
                    obtain2.readException();
                    return obtain2.readInt() != 0;
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override
            public void destroy(IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(7, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().destroy(iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void finalDestroy() throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    if (this.a.transact(11, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                    } else {
                        a.a().finalDestroy();
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override
            public void init(Intent intent, IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    if (intent != null) {
                        obtain.writeInt(1);
                        intent.writeToParcel(obtain, 0);
                    } else {
                        obtain.writeInt(0);
                    }
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(1, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().init(intent, iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void setParameter(Intent intent, IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    if (intent != null) {
                        obtain.writeInt(1);
                        intent.writeToParcel(obtain, 0);
                    } else {
                        obtain.writeInt(0);
                    }
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(12, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().setParameter(intent, iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void startListening(Intent intent, IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    if (intent != null) {
                        obtain.writeInt(1);
                        intent.writeToParcel(obtain, 0);
                    } else {
                        obtain.writeInt(0);
                    }
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(2, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().startListening(intent, iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void startVoiceDetect(Intent intent, IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    if (intent != null) {
                        obtain.writeInt(1);
                        intent.writeToParcel(obtain, 0);
                    } else {
                        obtain.writeInt(0);
                    }
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(9, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().startVoiceDetect(intent, iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void stopListening(IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(5, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().stopListening(iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void stopListeningWithIntent(Intent intent, IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    if (intent != null) {
                        obtain.writeInt(1);
                        intent.writeToParcel(obtain, 0);
                    } else {
                        obtain.writeInt(0);
                    }
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(13, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().stopListeningWithIntent(intent, iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void updateLexicon(Intent intent, IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    if (intent != null) {
                        obtain.writeInt(1);
                        intent.writeToParcel(obtain, 0);
                    } else {
                        obtain.writeInt(0);
                    }
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(4, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().updateLexicon(intent, iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void updateParams(Intent intent, IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    if (intent != null) {
                        obtain.writeInt(1);
                        intent.writeToParcel(obtain, 0);
                    } else {
                        obtain.writeInt(0);
                    }
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(14, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().updateParams(intent, iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void writePcm(byte[] bArr, int i, IAsrListener iAsrListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    obtain.writeByteArray(bArr);
                    obtain.writeInt(i);
                    obtain.writeStrongBinder(iAsrListener != null ? iAsrListener.asBinder() : null);
                    if (this.a.transact(3, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().writePcm(bArr, i, iAsrListener);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }

            @Override
            public void writePcmWithIntent(Intent intent, byte[] bArr, int i) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.huawei.hiai.asr.IAsrService");
                    if (intent != null) {
                        obtain.writeInt(1);
                        intent.writeToParcel(obtain, 0);
                    } else {
                        obtain.writeInt(0);
                    }
                    obtain.writeByteArray(bArr);
                    obtain.writeInt(i);
                    if (this.a.transact(15, obtain, obtain2, 0) || a.a() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                    } else {
                        a.a().writePcmWithIntent(intent, bArr, i);
                        obtain2.recycle();
                        obtain.recycle();
                    }
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            }
        }

        public static IAsrService a(IBinder iBinder) {
            if (iBinder == null) {
                return null;
            }
            IInterface queryLocalInterface = iBinder.queryLocalInterface("com.huawei.hiai.asr.IAsrService");
            return (queryLocalInterface == null || !(queryLocalInterface instanceof IAsrService)) ? new C0017a(iBinder) : (IAsrService) queryLocalInterface;
        }

        public static IAsrService a() {
            return C0017a.b;
        }
    }
}