package com.dowse.base;

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

/* loaded from: ds_base_2.0.9_23030112.aar:classes.jar:com/dowse/base/IParam.class */
public interface IParam extends IInterface {
    boolean setParam(String str, String str2, String str3) throws RemoteException;

    String getParam(String str, String str2) throws RemoteException;

    /* loaded from: ds_base_2.0.9_23030112.aar:classes.jar:com/dowse/base/IParam$Default.class */
    public static class Default implements IParam {
        @Override // com.dowse.base.IParam
        public boolean setParam(String type, String paramJsonStr, String call) throws RemoteException {
            return false;
        }

        @Override // com.dowse.base.IParam
        public String getParam(String type, String call) throws RemoteException {
            return null;
        }

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

    /* loaded from: ds_base_2.0.9_23030112.aar:classes.jar:com/dowse/base/IParam$Stub.class */
    public static abstract class Stub extends Binder implements IParam {
        private static final String DESCRIPTOR = "com.dowse.base.IParam";
        static final int TRANSACTION_setParam = 1;
        static final int TRANSACTION_getParam = 2;

        public Stub() {
            attachInterface(this, DESCRIPTOR);
        }

        public static IParam asInterface(IBinder obj) {
            if (obj == null) {
                return null;
            }
            IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
            if (iin != null && (iin instanceof IParam)) {
                return (IParam) iin;
            }
            return new Proxy(obj);
        }

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

        @Override // android.os.Binder
        public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
            switch (code) {
                case 1:
                    data.enforceInterface(DESCRIPTOR);
                    String _arg0 = data.readString();
                    String _arg1 = data.readString();
                    String _arg2 = data.readString();
                    boolean _result = setParam(_arg0, _arg1, _arg2);
                    reply.writeNoException();
                    reply.writeInt(_result ? 1 : 0);
                    return true;
                case 2:
                    data.enforceInterface(DESCRIPTOR);
                    String _arg02 = data.readString();
                    String _arg12 = data.readString();
                    String _result2 = getParam(_arg02, _arg12);
                    reply.writeNoException();
                    reply.writeString(_result2);
                    return true;
                case 1598968902:
                    reply.writeString(DESCRIPTOR);
                    return true;
                default:
                    return super.onTransact(code, data, reply, flags);
            }
        }

        /* JADX INFO: Access modifiers changed from: private */
        /* loaded from: ds_base_2.0.9_23030112.aar:classes.jar:com/dowse/base/IParam$Stub$Proxy.class */
        public static class Proxy implements IParam {
            private IBinder mRemote;
            public static IParam sDefaultImpl;

            Proxy(IBinder remote) {
                this.mRemote = remote;
            }

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

            public String getInterfaceDescriptor() {
                return Stub.DESCRIPTOR;
            }

            @Override // com.dowse.base.IParam
            public boolean setParam(String type, String paramJsonStr, String call) throws RemoteException {
                Parcel _data = Parcel.obtain();
                Parcel _reply = Parcel.obtain();
                try {
                    _data.writeInterfaceToken(Stub.DESCRIPTOR);
                    _data.writeString(type);
                    _data.writeString(paramJsonStr);
                    _data.writeString(call);
                    boolean _status = this.mRemote.transact(1, _data, _reply, 0);
                    if (!_status && Stub.getDefaultImpl() != null) {
                        boolean param = Stub.getDefaultImpl().setParam(type, paramJsonStr, call);
                        _reply.recycle();
                        _data.recycle();
                        return param;
                    }
                    _reply.readException();
                    boolean _result = 0 != _reply.readInt();
                    return _result;
                } finally {
                    _reply.recycle();
                    _data.recycle();
                }
            }

            @Override // com.dowse.base.IParam
            public String getParam(String type, String call) throws RemoteException {
                Parcel _data = Parcel.obtain();
                Parcel _reply = Parcel.obtain();
                try {
                    _data.writeInterfaceToken(Stub.DESCRIPTOR);
                    _data.writeString(type);
                    _data.writeString(call);
                    boolean _status = this.mRemote.transact(2, _data, _reply, 0);
                    if (!_status && Stub.getDefaultImpl() != null) {
                        String param = Stub.getDefaultImpl().getParam(type, call);
                        _reply.recycle();
                        _data.recycle();
                        return param;
                    }
                    _reply.readException();
                    String _result = _reply.readString();
                    _reply.recycle();
                    _data.recycle();
                    return _result;
                } catch (Throwable th) {
                    _reply.recycle();
                    _data.recycle();
                    throw th;
                }
            }
        }

        public static boolean setDefaultImpl(IParam impl) {
            if (Proxy.sDefaultImpl != null) {
                throw new IllegalStateException("setDefaultImpl() called twice");
            }
            if (impl != null) {
                Proxy.sDefaultImpl = impl;
                return true;
            }
            return false;
        }

        public static IParam getDefaultImpl() {
            return Proxy.sDefaultImpl;
        }
    }
}
