discord-jadx/app/src/main/java/x/a/a/c.java

155 lines
6.1 KiB
Java

package x.a.a;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import x.a.a.a;
/* compiled from: IPostMessageService */
public interface c extends IInterface {
/* compiled from: IPostMessageService */
public static abstract class a extends Binder implements c {
private static final String DESCRIPTOR = "android.support.customtabs.IPostMessageService";
public static final int TRANSACTION_onMessageChannelReady = 2;
public static final int TRANSACTION_onPostMessage = 3;
/* compiled from: IPostMessageService */
/* renamed from: x.a.a.c$a$a reason: collision with other inner class name */
public static class C0348a implements c {
public static c a;
public IBinder b;
public C0348a(IBinder iBinder) {
this.b = iBinder;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this.b;
}
@Override // x.a.a.c
public void onMessageChannelReady(a aVar, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken("android.support.customtabs.IPostMessageService");
obtain.writeStrongBinder(aVar != null ? aVar.asBinder() : null);
if (bundle != null) {
obtain.writeInt(1);
bundle.writeToParcel(obtain, 0);
} else {
obtain.writeInt(0);
}
if (this.b.transact(2, obtain, obtain2, 0) || a.getDefaultImpl() == null) {
obtain2.readException();
obtain2.recycle();
obtain.recycle();
return;
}
a.getDefaultImpl().onMessageChannelReady(aVar, bundle);
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // x.a.a.c
public void onPostMessage(a aVar, String str, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken("android.support.customtabs.IPostMessageService");
obtain.writeStrongBinder(aVar != null ? aVar.asBinder() : null);
obtain.writeString(str);
if (bundle != null) {
obtain.writeInt(1);
bundle.writeToParcel(obtain, 0);
} else {
obtain.writeInt(0);
}
if (this.b.transact(3, obtain, obtain2, 0) || a.getDefaultImpl() == null) {
obtain2.readException();
obtain2.recycle();
obtain.recycle();
return;
}
a.getDefaultImpl().onPostMessage(aVar, str, bundle);
} finally {
obtain2.recycle();
obtain.recycle();
}
}
}
public a() {
attachInterface(this, "android.support.customtabs.IPostMessageService");
}
public static c asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("android.support.customtabs.IPostMessageService");
return (queryLocalInterface == null || !(queryLocalInterface instanceof c)) ? new C0348a(iBinder) : (c) queryLocalInterface;
}
public static c getDefaultImpl() {
return C0348a.a;
}
public static boolean setDefaultImpl(c cVar) {
if (C0348a.a != null) {
throw new IllegalStateException("setDefaultImpl() called twice");
} else if (cVar == null) {
return false;
} else {
C0348a.a = cVar;
return true;
}
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
Bundle bundle = null;
if (i == 2) {
parcel.enforceInterface("android.support.customtabs.IPostMessageService");
a asInterface = a.AbstractBinderC0345a.asInterface(parcel.readStrongBinder());
if (parcel.readInt() != 0) {
bundle = (Bundle) Bundle.CREATOR.createFromParcel(parcel);
}
onMessageChannelReady(asInterface, bundle);
parcel2.writeNoException();
return true;
} else if (i == 3) {
parcel.enforceInterface("android.support.customtabs.IPostMessageService");
a asInterface2 = a.AbstractBinderC0345a.asInterface(parcel.readStrongBinder());
String readString = parcel.readString();
if (parcel.readInt() != 0) {
bundle = (Bundle) Bundle.CREATOR.createFromParcel(parcel);
}
onPostMessage(asInterface2, readString, bundle);
parcel2.writeNoException();
return true;
} else if (i != 1598968902) {
return super.onTransact(i, parcel, parcel2, i2);
} else {
parcel2.writeString("android.support.customtabs.IPostMessageService");
return true;
}
}
}
void onMessageChannelReady(a aVar, Bundle bundle) throws RemoteException;
void onPostMessage(a aVar, String str, Bundle bundle) throws RemoteException;
}