package d.e.a;

import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import com.seewo.adbcommons.model.remote.RemoteCmdMsg;

/* JADX INFO: compiled from: IADBRemote.java */
/* JADX INFO: loaded from: classes.dex */
public interface b extends IInterface {

    /* JADX INFO: compiled from: IADBRemote.java */
    public static abstract class a extends Binder implements b {

        /* JADX INFO: renamed from: d.e.a.b$a$a, reason: collision with other inner class name */
        /* JADX INFO: compiled from: IADBRemote.java */
        private static class C0082a implements b {

            /* JADX INFO: renamed from: b, reason: collision with root package name */
            private IBinder f3446b;

            C0082a(IBinder iBinder) {
                this.f3446b = iBinder;
            }

            @Override // android.os.IInterface
            public IBinder asBinder() {
                return this.f3446b;
            }

            @Override // d.e.a.b
            public boolean isConnected() throws RemoteException {
                Parcel parcelObtain = Parcel.obtain();
                Parcel parcelObtain2 = Parcel.obtain();
                try {
                    parcelObtain.writeInterfaceToken("com.seewo.adbcommons.IADBRemote");
                    this.f3446b.transact(5, parcelObtain, parcelObtain2, 0);
                    parcelObtain2.readException();
                    return parcelObtain2.readInt() != 0;
                } finally {
                    parcelObtain2.recycle();
                    parcelObtain.recycle();
                }
            }

            @Override // d.e.a.b
            public void k(RemoteCmdMsg remoteCmdMsg) throws RemoteException {
                Parcel parcelObtain = Parcel.obtain();
                Parcel parcelObtain2 = Parcel.obtain();
                try {
                    parcelObtain.writeInterfaceToken("com.seewo.adbcommons.IADBRemote");
                    if (remoteCmdMsg != null) {
                        parcelObtain.writeInt(1);
                        remoteCmdMsg.writeToParcel(parcelObtain, 0);
                    } else {
                        parcelObtain.writeInt(0);
                    }
                    this.f3446b.transact(1, parcelObtain, parcelObtain2, 0);
                    parcelObtain2.readException();
                } finally {
                    parcelObtain2.recycle();
                    parcelObtain.recycle();
                }
            }
        }

        public static b J(IBinder iBinder) {
            if (iBinder == null) {
                return null;
            }
            IInterface iInterfaceQueryLocalInterface = iBinder.queryLocalInterface("com.seewo.adbcommons.IADBRemote");
            return (iInterfaceQueryLocalInterface == null || !(iInterfaceQueryLocalInterface instanceof b)) ? new C0082a(iBinder) : (b) iInterfaceQueryLocalInterface;
        }
    }

    boolean isConnected() throws RemoteException;

    void k(RemoteCmdMsg remoteCmdMsg) throws RemoteException;
}
