翰林优商.apk(点击下载) / VideoBinderInterface.java


package com.mbridge.msdk.foundation.aidl;

import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import com.mbridge.msdk.foundation.aidl.VideoBinderListener;

public interface VideoBinderInterface extends IInterface {

    public static class Default implements VideoBinderInterface {
        public IBinder asBinder() {
            return null;
        }

        @Override // com.mbridge.msdk.foundation.aidl.VideoBinderInterface
        public void registerListener(VideoBinderListener videoBinderListener) throws RemoteException {
        }

        @Override // com.mbridge.msdk.foundation.aidl.VideoBinderInterface
        public void requestVideo(String[] strArr) throws RemoteException {
        }
    }

    void registerListener(VideoBinderListener videoBinderListener) throws RemoteException;

    void requestVideo(String[] strArr) throws RemoteException;

    public static abstract class Stub extends Binder implements VideoBinderInterface {
        private static final String DESCRIPTOR = "com.mbridge.msdk.foundation.aidl.VideoBinderInterface";
        static final int TRANSACTION_registerListener = 2;
        static final int TRANSACTION_requestVideo = 1;

        public IBinder asBinder() {
            return this;
        }

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

        public static VideoBinderInterface asInterface(IBinder iBinder) {
            if (iBinder == null) {
                return null;
            }
            IInterface queryLocalInterface = iBinder.queryLocalInterface(DESCRIPTOR);
            if (queryLocalInterface == null || !(queryLocalInterface instanceof VideoBinderInterface)) {
                return new a(iBinder);
            }
            return (VideoBinderInterface) queryLocalInterface;
        }

        @Override // android.os.Binder
        public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
            if (i == 1) {
                parcel.enforceInterface(DESCRIPTOR);
                requestVideo(parcel.createStringArray());
                parcel2.writeNoException();
                return true;
            } else if (i == 2) {
                parcel.enforceInterface(DESCRIPTOR);
                registerListener(VideoBinderListener.a.a(parcel.readStrongBinder()));
                parcel2.writeNoException();
                return true;
            } else if (i != 1598968902) {
                return super.onTransact(i, parcel, parcel2, i2);
            } else {
                parcel2.writeString(DESCRIPTOR);
                return true;
            }
        }

        /* access modifiers changed from: private */
        public static class a implements VideoBinderInterface {
            public static VideoBinderInterface a;
            private IBinder b;

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

            public final IBinder asBinder() {
                return this.b;
            }

            @Override // com.mbridge.msdk.foundation.aidl.VideoBinderInterface
            public final void requestVideo(String[] strArr) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(Stub.DESCRIPTOR);
                    obtain.writeStringArray(strArr);
                    if (this.b.transact(1, obtain, obtain2, 0) || Stub.getDefaultImpl() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                        return;
                    }
                    Stub.getDefaultImpl().requestVideo(strArr);
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.mbridge.msdk.foundation.aidl.VideoBinderInterface
            public final void registerListener(VideoBinderListener videoBinderListener) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(Stub.DESCRIPTOR);
                    obtain.writeStrongBinder(videoBinderListener != null ? videoBinderListener.asBinder() : null);
                    if (this.b.transact(2, obtain, obtain2, 0) || Stub.getDefaultImpl() == null) {
                        obtain2.readException();
                        obtain2.recycle();
                        obtain.recycle();
                        return;
                    }
                    Stub.getDefaultImpl().registerListener(videoBinderListener);
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }
        }

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

        public static VideoBinderInterface getDefaultImpl() {
            return a.a;
        }
    }
}