package com.seewo.sdk.internal.model;

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

/* JADX INFO: loaded from: classes.dex */
public interface IWatchDogService extends IInterface {

    public static class Default implements IWatchDogService {
        @Override // android.os.IInterface
        public IBinder asBinder() {
            return null;
        }

        @Override // com.seewo.sdk.internal.model.IWatchDogService
        public void bindWatchDog(IBinder iBinder, String str) throws RemoteException {
        }

        @Override // com.seewo.sdk.internal.model.IWatchDogService
        public void unbindWatchDog(String str) throws RemoteException {
        }
    }

    public static abstract class Stub extends Binder implements IWatchDogService {

        private static class a implements IWatchDogService {

            /* JADX INFO: renamed from: a, reason: collision with root package name */
            public static IWatchDogService f2493a;

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

            a(IBinder iBinder) {
                this.f2494b = iBinder;
            }

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

            @Override // com.seewo.sdk.internal.model.IWatchDogService
            public void bindWatchDog(IBinder iBinder, String str) throws RemoteException {
                Parcel parcelObtain = Parcel.obtain();
                Parcel parcelObtain2 = Parcel.obtain();
                try {
                    parcelObtain.writeInterfaceToken("com.seewo.sdk.internal.model.IWatchDogService");
                    parcelObtain.writeStrongBinder(iBinder);
                    parcelObtain.writeString(str);
                    if (this.f2494b.transact(1, parcelObtain, parcelObtain2, 0) || Stub.getDefaultImpl() == null) {
                        parcelObtain2.readException();
                    } else {
                        Stub.getDefaultImpl().bindWatchDog(iBinder, str);
                    }
                } finally {
                    parcelObtain2.recycle();
                    parcelObtain.recycle();
                }
            }

            @Override // com.seewo.sdk.internal.model.IWatchDogService
            public void unbindWatchDog(String str) throws RemoteException {
                Parcel parcelObtain = Parcel.obtain();
                Parcel parcelObtain2 = Parcel.obtain();
                try {
                    parcelObtain.writeInterfaceToken("com.seewo.sdk.internal.model.IWatchDogService");
                    parcelObtain.writeString(str);
                    if (this.f2494b.transact(2, parcelObtain, parcelObtain2, 0) || Stub.getDefaultImpl() == null) {
                        parcelObtain2.readException();
                    } else {
                        Stub.getDefaultImpl().unbindWatchDog(str);
                    }
                } finally {
                    parcelObtain2.recycle();
                    parcelObtain.recycle();
                }
            }
        }

        public Stub() {
            attachInterface(this, "com.seewo.sdk.internal.model.IWatchDogService");
        }

        public static IWatchDogService asInterface(IBinder iBinder) {
            if (iBinder == null) {
                return null;
            }
            IInterface iInterfaceQueryLocalInterface = iBinder.queryLocalInterface("com.seewo.sdk.internal.model.IWatchDogService");
            return (iInterfaceQueryLocalInterface == null || !(iInterfaceQueryLocalInterface instanceof IWatchDogService)) ? new a(iBinder) : (IWatchDogService) iInterfaceQueryLocalInterface;
        }

        public static IWatchDogService getDefaultImpl() {
            return a.f2493a;
        }

        public static boolean setDefaultImpl(IWatchDogService iWatchDogService) {
            if (a.f2493a != null) {
                throw new IllegalStateException("setDefaultImpl() called twice");
            }
            if (iWatchDogService == null) {
                return false;
            }
            a.f2493a = iWatchDogService;
            return true;
        }

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

        @Override // android.os.Binder
        public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
            if (i == 1) {
                parcel.enforceInterface("com.seewo.sdk.internal.model.IWatchDogService");
                bindWatchDog(parcel.readStrongBinder(), parcel.readString());
                parcel2.writeNoException();
                return true;
            }
            if (i != 2) {
                if (i != 1598968902) {
                    return super.onTransact(i, parcel, parcel2, i2);
                }
                parcel2.writeString("com.seewo.sdk.internal.model.IWatchDogService");
                return true;
            }
            parcel.enforceInterface("com.seewo.sdk.internal.model.IWatchDogService");
            unbindWatchDog(parcel.readString());
            parcel2.writeNoException();
            return true;
        }
    }

    void bindWatchDog(IBinder iBinder, String str) throws RemoteException;

    void unbindWatchDog(String str) throws RemoteException;
}
