package com.amazon.d.a;

import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import com.amazon.d.a.f;
import com.amazon.d.a.g;
import com.amazon.d.a.h;
import com.amazon.d.a.j;
/* compiled from: ResultCallback.java */
/* loaded from: classes.dex */
public interface i extends IInterface {
    void a(f fVar) throws RemoteException;

    void a(g gVar) throws RemoteException;

    void a(h hVar) throws RemoteException;

    void a(j jVar) throws RemoteException;

    /* compiled from: ResultCallback.java */
    /* loaded from: classes.dex */
    public static abstract class a extends Binder implements i {

        /* renamed from: a  reason: collision with root package name */
        private static final String f168a = "com.amazon.venezia.command.ResultCallback";
        static final int b = 1;
        static final int c = 2;
        static final int d = 3;
        static final int e = 4;

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

        public a() {
            attachInterface(this, f168a);
        }

        public static i a(IBinder iBinder) {
            if (iBinder == null) {
                return null;
            }
            IInterface queryLocalInterface = iBinder.queryLocalInterface(f168a);
            if (queryLocalInterface != null && (queryLocalInterface instanceof i)) {
                return (i) queryLocalInterface;
            }
            return new C0017a(iBinder);
        }

        @Override // android.os.Binder
        public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
            if (i == 1) {
                parcel.enforceInterface(f168a);
                a(j.a.a(parcel.readStrongBinder()));
                parcel2.writeNoException();
                return true;
            } else if (i == 2) {
                parcel.enforceInterface(f168a);
                a(h.a.a(parcel.readStrongBinder()));
                parcel2.writeNoException();
                return true;
            } else if (i == 3) {
                parcel.enforceInterface(f168a);
                a(f.a.a(parcel.readStrongBinder()));
                parcel2.writeNoException();
                return true;
            } else if (i != 4) {
                if (i == 1598968902) {
                    parcel2.writeString(f168a);
                    return true;
                }
                return super.onTransact(i, parcel, parcel2, i2);
            } else {
                parcel.enforceInterface(f168a);
                a(g.a.a(parcel.readStrongBinder()));
                parcel2.writeNoException();
                return true;
            }
        }

        /* compiled from: ResultCallback.java */
        /* renamed from: com.amazon.d.a.i$a$a  reason: collision with other inner class name */
        /* loaded from: classes.dex */
        private static class C0017a implements i {

            /* renamed from: a  reason: collision with root package name */
            private IBinder f169a;

            public String a() {
                return a.f168a;
            }

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

            C0017a(IBinder iBinder) {
                this.f169a = iBinder;
            }

            @Override // com.amazon.d.a.i
            public void a(j jVar) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(a.f168a);
                    obtain.writeStrongBinder(jVar != null ? jVar.asBinder() : null);
                    this.f169a.transact(1, obtain, obtain2, 0);
                    obtain2.readException();
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.amazon.d.a.i
            public void a(h hVar) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(a.f168a);
                    obtain.writeStrongBinder(hVar != null ? hVar.asBinder() : null);
                    this.f169a.transact(2, obtain, obtain2, 0);
                    obtain2.readException();
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.amazon.d.a.i
            public void a(f fVar) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(a.f168a);
                    obtain.writeStrongBinder(fVar != null ? fVar.asBinder() : null);
                    this.f169a.transact(3, obtain, obtain2, 0);
                    obtain2.readException();
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.amazon.d.a.i
            public void a(g gVar) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(a.f168a);
                    obtain.writeStrongBinder(gVar != null ? gVar.asBinder() : null);
                    this.f169a.transact(4, obtain, obtain2, 0);
                    obtain2.readException();
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }
        }
    }
}
