package com.kwai.filedownloader.b; import android.app.Notification; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import com.kwai.filedownloader.b.a; public interface b extends IInterface { public static abstract class a extends Binder implements b { /* access modifiers changed from: package-private */ /* renamed from: com.kwai.filedownloader.b.b$a$a reason: collision with other inner class name */ public static class C0185a implements b { public static b bJt; private IBinder mRemote; C0185a(IBinder iBinder) { this.mRemote = iBinder; } @Override // com.kwai.filedownloader.b.b public final void a(a aVar) { Parcel obtain = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeStrongBinder(aVar != null ? aVar.asBinder() : null); if (this.mRemote.transact(1, obtain, null, 1) || a.acV() == null) { obtain.recycle(); } else { a.acV().a(aVar); } } finally { obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final void acU() { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); if (this.mRemote.transact(15, obtain, obtain2, 0) || a.acV() == null) { obtain2.readException(); } else { a.acV().acU(); } } finally { obtain2.recycle(); obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final boolean an(String str, String str2) { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeString(str); obtain.writeString(str2); boolean z = false; if (!this.mRemote.transact(3, obtain, obtain2, 0) && a.acV() != null) { return a.acV().an(str, str2); } obtain2.readException(); if (obtain2.readInt() != 0) { z = true; } obtain2.recycle(); obtain.recycle(); return z; } finally { obtain2.recycle(); obtain.recycle(); } } public final IBinder asBinder() { return this.mRemote; } @Override // com.kwai.filedownloader.b.b public final void b(a aVar) { Parcel obtain = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeStrongBinder(aVar != null ? aVar.asBinder() : null); if (this.mRemote.transact(2, obtain, null, 1) || a.acV() == null) { obtain.recycle(); } else { a.acV().b(aVar); } } finally { obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final void b(String str, String str2, boolean z, int i, int i2, int i3, boolean z2, com.kwai.filedownloader.c.b bVar, boolean z3) { Throwable th; Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeString(str); obtain.writeString(str2); int i4 = 1; obtain.writeInt(z ? 1 : 0); obtain.writeInt(i); obtain.writeInt(i2); obtain.writeInt(i3); obtain.writeInt(z2 ? 1 : 0); if (bVar != null) { obtain.writeInt(1); bVar.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } if (!z3) { i4 = 0; } obtain.writeInt(i4); try { if (this.mRemote.transact(4, obtain, obtain2, 0) || a.acV() == null) { obtain2.readException(); } else { a.acV().b(str, str2, z, i, i2, i3, z2, bVar, z3); } obtain2.recycle(); obtain.recycle(); } catch (Throwable th2) { th = th2; obtain2.recycle(); obtain.recycle(); throw th; } } catch (Throwable th3) { th = th3; obtain2.recycle(); obtain.recycle(); throw th; } } @Override // com.kwai.filedownloader.b.b public final byte eA(int i) { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeInt(i); if (!this.mRemote.transact(10, obtain, obtain2, 0) && a.acV() != null) { return a.acV().eA(i); } obtain2.readException(); byte readByte = obtain2.readByte(); obtain2.recycle(); obtain.recycle(); return readByte; } finally { obtain2.recycle(); obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final boolean eB(int i) { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeInt(i); boolean z = false; if (!this.mRemote.transact(14, obtain, obtain2, 0) && a.acV() != null) { return a.acV().eB(i); } obtain2.readException(); if (obtain2.readInt() != 0) { z = true; } obtain2.recycle(); obtain.recycle(); return z; } finally { obtain2.recycle(); obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final boolean eT(int i) { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeInt(i); boolean z = false; if (!this.mRemote.transact(7, obtain, obtain2, 0) && a.acV() != null) { return a.acV().eT(i); } obtain2.readException(); if (obtain2.readInt() != 0) { z = true; } obtain2.recycle(); obtain.recycle(); return z; } finally { obtain2.recycle(); obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final long eU(int i) { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeInt(i); if (!this.mRemote.transact(8, obtain, obtain2, 0) && a.acV() != null) { return a.acV().eU(i); } obtain2.readException(); long readLong = obtain2.readLong(); obtain2.recycle(); obtain.recycle(); return readLong; } finally { obtain2.recycle(); obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final long eV(int i) { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeInt(i); if (!this.mRemote.transact(9, obtain, obtain2, 0) && a.acV() != null) { return a.acV().eV(i); } obtain2.readException(); long readLong = obtain2.readLong(); obtain2.recycle(); obtain.recycle(); return readLong; } finally { obtain2.recycle(); obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final boolean ez(int i) { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeInt(i); boolean z = false; if (!this.mRemote.transact(5, obtain, obtain2, 0) && a.acV() != null) { return a.acV().ez(i); } obtain2.readException(); if (obtain2.readInt() != 0) { z = true; } obtain2.recycle(); obtain.recycle(); return z; } finally { obtain2.recycle(); obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final boolean isIdle() { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); boolean z = false; if (!this.mRemote.transact(11, obtain, obtain2, 0) && a.acV() != null) { return a.acV().isIdle(); } obtain2.readException(); if (obtain2.readInt() != 0) { z = true; } obtain2.recycle(); obtain.recycle(); return z; } finally { obtain2.recycle(); obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final void pauseAllTasks() { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); if (this.mRemote.transact(6, obtain, obtain2, 0) || a.acV() == null) { obtain2.readException(); } else { a.acV().pauseAllTasks(); } } finally { obtain2.recycle(); obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final void startForeground(int i, Notification notification) { Parcel obtain = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeInt(i); if (notification != null) { obtain.writeInt(1); notification.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } if (this.mRemote.transact(12, obtain, null, 1) || a.acV() == null) { obtain.recycle(); } else { a.acV().startForeground(i, notification); } } finally { obtain.recycle(); } } @Override // com.kwai.filedownloader.b.b public final void stopForeground(boolean z) { Parcel obtain = Parcel.obtain(); try { obtain.writeInterfaceToken("com.kwai.filedownloader.i.IFileDownloadIPCService"); obtain.writeInt(z ? 1 : 0); if (this.mRemote.transact(13, obtain, null, 1) || a.acV() == null) { obtain.recycle(); } else { a.acV().stopForeground(z); } } finally { obtain.recycle(); } } } public a() { attachInterface(this, "com.kwai.filedownloader.i.IFileDownloadIPCService"); } public static b a(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); return (queryLocalInterface == null || !(queryLocalInterface instanceof b)) ? new C0185a(iBinder) : (b) queryLocalInterface; } public static b acV() { return C0185a.bJt; } public IBinder asBinder() { return this; } @Override // android.os.Binder public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) { if (i != 1598968902) { Notification notification = null; boolean z = false; switch (i) { case 1: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); a(a.AbstractBinderC0183a.c(parcel.readStrongBinder())); return true; case 2: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); b(a.AbstractBinderC0183a.c(parcel.readStrongBinder())); return true; case 3: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); boolean an = an(parcel.readString(), parcel.readString()); parcel2.writeNoException(); parcel2.writeInt(an ? 1 : 0); return true; case 4: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); b(parcel.readString(), parcel.readString(), parcel.readInt() != 0, parcel.readInt(), parcel.readInt(), parcel.readInt(), parcel.readInt() != 0, parcel.readInt() != 0 ? com.kwai.filedownloader.c.b.CREATOR.createFromParcel(parcel) : null, parcel.readInt() != 0); parcel2.writeNoException(); return true; case 5: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); boolean ez = ez(parcel.readInt()); parcel2.writeNoException(); parcel2.writeInt(ez ? 1 : 0); return true; case 6: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); pauseAllTasks(); parcel2.writeNoException(); return true; case 7: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); boolean eT = eT(parcel.readInt()); parcel2.writeNoException(); parcel2.writeInt(eT ? 1 : 0); return true; case 8: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); long eU = eU(parcel.readInt()); parcel2.writeNoException(); parcel2.writeLong(eU); return true; case 9: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); long eV = eV(parcel.readInt()); parcel2.writeNoException(); parcel2.writeLong(eV); return true; case 10: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); byte eA = eA(parcel.readInt()); parcel2.writeNoException(); parcel2.writeByte(eA); return true; case 11: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); boolean isIdle = isIdle(); parcel2.writeNoException(); parcel2.writeInt(isIdle ? 1 : 0); return true; case 12: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); int readInt = parcel.readInt(); if (parcel.readInt() != 0) { notification = (Notification) Notification.CREATOR.createFromParcel(parcel); } startForeground(readInt, notification); return true; case 13: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); if (parcel.readInt() != 0) { z = true; } stopForeground(z); return true; case 14: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); boolean eB = eB(parcel.readInt()); parcel2.writeNoException(); parcel2.writeInt(eB ? 1 : 0); return true; case 15: parcel.enforceInterface("com.kwai.filedownloader.i.IFileDownloadIPCService"); acU(); parcel2.writeNoException(); return true; default: return super.onTransact(i, parcel, parcel2, i2); } } else { parcel2.writeString("com.kwai.filedownloader.i.IFileDownloadIPCService"); return true; } } } void a(a aVar); void acU(); boolean an(String str, String str2); void b(a aVar); void b(String str, String str2, boolean z, int i, int i2, int i3, boolean z2, com.kwai.filedownloader.c.b bVar, boolean z3); byte eA(int i); boolean eB(int i); boolean eT(int i); long eU(int i); long eV(int i); boolean ez(int i); boolean isIdle(); void pauseAllTasks(); void startForeground(int i, Notification notification); void stopForeground(boolean z); }