package Mqv2r_3.KQgRr5e_0.KQgRr5e_0.QxJ9d_1.IFxWkV_5;

import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import android.view.KeyEvent;
/* compiled from: IMediaSession.java */
/* loaded from: classes.dex */
public interface QxJ9d_1 extends IInterface {
    void KQgRr5e_0(Mqv2r_3.KQgRr5e_0.KQgRr5e_0.QxJ9d_1.IFxWkV_5.KQgRr5e_0 kQgRr5e_0) throws RemoteException;

    boolean KQgRr5e_0(KeyEvent keyEvent) throws RemoteException;

    /* compiled from: IMediaSession.java */
    /* loaded from: classes.dex */
    public static abstract class KQgRr5e_0 extends Binder implements QxJ9d_1 {
        public static QxJ9d_1 KQgRr5e_0(IBinder iBinder) {
            if (iBinder == null) {
                return null;
            }
            IInterface queryLocalInterface = iBinder.queryLocalInterface("android.support.v4.media.session.IMediaSession");
            if (queryLocalInterface != null && (queryLocalInterface instanceof QxJ9d_1)) {
                return (QxJ9d_1) queryLocalInterface;
            }
            return new C0029KQgRr5e_0(iBinder);
        }

        /* compiled from: IMediaSession.java */
        /* renamed from: Mqv2r_3.KQgRr5e_0.KQgRr5e_0.QxJ9d_1.IFxWkV_5.QxJ9d_1$KQgRr5e_0$KQgRr5e_0  reason: collision with other inner class name */
        /* loaded from: classes.dex */
        public static class C0029KQgRr5e_0 implements QxJ9d_1 {
            public IBinder KQgRr5e_0;

            public C0029KQgRr5e_0(IBinder iBinder) {
                this.KQgRr5e_0 = iBinder;
            }

            @Override // Mqv2r_3.KQgRr5e_0.KQgRr5e_0.QxJ9d_1.IFxWkV_5.QxJ9d_1
            public boolean KQgRr5e_0(KeyEvent keyEvent) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession");
                    if (keyEvent != null) {
                        obtain.writeInt(1);
                        keyEvent.writeToParcel(obtain, 0);
                    } else {
                        obtain.writeInt(0);
                    }
                    this.KQgRr5e_0.transact(2, obtain, obtain2, 0);
                    obtain2.readException();
                    return obtain2.readInt() != 0;
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

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

            @Override // Mqv2r_3.KQgRr5e_0.KQgRr5e_0.QxJ9d_1.IFxWkV_5.QxJ9d_1
            public void KQgRr5e_0(Mqv2r_3.KQgRr5e_0.KQgRr5e_0.QxJ9d_1.IFxWkV_5.KQgRr5e_0 kQgRr5e_0) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession");
                    obtain.writeStrongBinder(kQgRr5e_0 != null ? kQgRr5e_0.asBinder() : null);
                    this.KQgRr5e_0.transact(3, obtain, obtain2, 0);
                    obtain2.readException();
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }
        }
    }
}
