package com.bytedance.pangle; import android.content.ComponentName; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; public interface f extends IInterface { int a(); void a(ComponentName componentName, IBinder iBinder); public static abstract class a extends Binder implements f { public IBinder asBinder() { return this; } public a() { attachInterface(this, "com.bytedance.pangle.ServiceConnection"); } public static f a(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface("com.bytedance.pangle.ServiceConnection"); if (queryLocalInterface == null || !(queryLocalInterface instanceof f)) { return new C0019a(iBinder); } return (f) queryLocalInterface; } @Override // android.os.Binder public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) { if (i == 1) { parcel.enforceInterface("com.bytedance.pangle.ServiceConnection"); a(parcel.readInt() != 0 ? (ComponentName) ComponentName.CREATOR.createFromParcel(parcel) : null, parcel.readStrongBinder()); parcel2.writeNoException(); return true; } else if (i == 2) { parcel.enforceInterface("com.bytedance.pangle.ServiceConnection"); int a = a(); parcel2.writeNoException(); parcel2.writeInt(a); return true; } else if (i != 1598968902) { return super.onTransact(i, parcel, parcel2, i2); } else { parcel2.writeString("com.bytedance.pangle.ServiceConnection"); return true; } } /* access modifiers changed from: package-private */ /* renamed from: com.bytedance.pangle.f$a$a reason: collision with other inner class name */ public static class C0019a implements f { public static f a; private IBinder b; C0019a(IBinder iBinder) { this.b = iBinder; } public final IBinder asBinder() { return this.b; } @Override // com.bytedance.pangle.f public final void a(ComponentName componentName, IBinder iBinder) { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.bytedance.pangle.ServiceConnection"); if (componentName != null) { obtain.writeInt(1); componentName.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } obtain.writeStrongBinder(iBinder); if (this.b.transact(1, obtain, obtain2, 0) || a.b() == null) { obtain2.readException(); } else { a.b().a(componentName, iBinder); } } finally { obtain2.recycle(); obtain.recycle(); } } @Override // com.bytedance.pangle.f public final int a() { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.bytedance.pangle.ServiceConnection"); if (!this.b.transact(2, obtain, obtain2, 0) && a.b() != null) { return a.b().a(); } obtain2.readException(); int readInt = obtain2.readInt(); obtain2.recycle(); obtain.recycle(); return readInt; } finally { obtain2.recycle(); obtain.recycle(); } } } public static f b() { return C0019a.a; } } }