179 lines
6.6 KiB
Java
179 lines
6.6 KiB
Java
package com.peaky.binders;
|
|
|
|
import android.os.Binder;
|
|
import android.os.IBinder;
|
|
import android.os.IInterface;
|
|
import android.os.Parcel;
|
|
import android.os.RemoteException;
|
|
|
|
/* JADX INFO: loaded from: classes.dex */
|
|
public interface IPeakyService extends IInterface {
|
|
|
|
public static class Default implements IPeakyService {
|
|
@Override // com.peaky.binders.IPeakyService
|
|
public void DebugCheckFile(byte[] bArr) throws RemoteException {
|
|
}
|
|
|
|
@Override // android.os.IInterface
|
|
public IBinder asBinder() {
|
|
return null;
|
|
}
|
|
|
|
@Override // com.peaky.binders.IPeakyService
|
|
public void enableDebugMode(boolean z) throws RemoteException {
|
|
}
|
|
|
|
@Override // com.peaky.binders.IPeakyService
|
|
public boolean isAchievementUnlocked(int i) throws RemoteException {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
void DebugCheckFile(byte[] bArr) throws RemoteException;
|
|
|
|
void enableDebugMode(boolean z) throws RemoteException;
|
|
|
|
boolean isAchievementUnlocked(int i) throws RemoteException;
|
|
|
|
public static abstract class Stub extends Binder implements IPeakyService {
|
|
private static final String DESCRIPTOR = "com.peaky.binders.IPeakyService";
|
|
static final int TRANSACTION_DebugCheckFile = 1;
|
|
static final int TRANSACTION_enableDebugMode = 3;
|
|
static final int TRANSACTION_isAchievementUnlocked = 2;
|
|
|
|
@Override // android.os.IInterface
|
|
public IBinder asBinder() {
|
|
return this;
|
|
}
|
|
|
|
public Stub() {
|
|
attachInterface(this, DESCRIPTOR);
|
|
}
|
|
|
|
public static IPeakyService asInterface(IBinder iBinder) {
|
|
if (iBinder == null) {
|
|
return null;
|
|
}
|
|
IInterface iInterfaceQueryLocalInterface = iBinder.queryLocalInterface(DESCRIPTOR);
|
|
if (iInterfaceQueryLocalInterface != null && (iInterfaceQueryLocalInterface instanceof IPeakyService)) {
|
|
return (IPeakyService) iInterfaceQueryLocalInterface;
|
|
}
|
|
return new Proxy(iBinder);
|
|
}
|
|
|
|
@Override // android.os.Binder
|
|
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
|
|
if (i == 1) {
|
|
parcel.enforceInterface(DESCRIPTOR);
|
|
DebugCheckFile(parcel.createByteArray());
|
|
parcel2.writeNoException();
|
|
return true;
|
|
}
|
|
if (i == 2) {
|
|
parcel.enforceInterface(DESCRIPTOR);
|
|
boolean zIsAchievementUnlocked = isAchievementUnlocked(parcel.readInt());
|
|
parcel2.writeNoException();
|
|
parcel2.writeInt(zIsAchievementUnlocked ? 1 : 0);
|
|
return true;
|
|
}
|
|
if (i != 3) {
|
|
if (i == 1598968902) {
|
|
parcel2.writeString(DESCRIPTOR);
|
|
return true;
|
|
}
|
|
return super.onTransact(i, parcel, parcel2, i2);
|
|
}
|
|
parcel.enforceInterface(DESCRIPTOR);
|
|
enableDebugMode(parcel.readInt() != 0);
|
|
parcel2.writeNoException();
|
|
return true;
|
|
}
|
|
|
|
private static class Proxy implements IPeakyService {
|
|
public static IPeakyService sDefaultImpl;
|
|
private IBinder mRemote;
|
|
|
|
public String getInterfaceDescriptor() {
|
|
return Stub.DESCRIPTOR;
|
|
}
|
|
|
|
Proxy(IBinder iBinder) {
|
|
this.mRemote = iBinder;
|
|
}
|
|
|
|
@Override // android.os.IInterface
|
|
public IBinder asBinder() {
|
|
return this.mRemote;
|
|
}
|
|
|
|
@Override // com.peaky.binders.IPeakyService
|
|
public void DebugCheckFile(byte[] bArr) throws RemoteException {
|
|
Parcel parcelObtain = Parcel.obtain();
|
|
Parcel parcelObtain2 = Parcel.obtain();
|
|
try {
|
|
parcelObtain.writeInterfaceToken(Stub.DESCRIPTOR);
|
|
parcelObtain.writeByteArray(bArr);
|
|
if (!this.mRemote.transact(1, parcelObtain, parcelObtain2, 0) && Stub.getDefaultImpl() != null) {
|
|
Stub.getDefaultImpl().DebugCheckFile(bArr);
|
|
} else {
|
|
parcelObtain2.readException();
|
|
}
|
|
} finally {
|
|
parcelObtain2.recycle();
|
|
parcelObtain.recycle();
|
|
}
|
|
}
|
|
|
|
@Override // com.peaky.binders.IPeakyService
|
|
public boolean isAchievementUnlocked(int i) throws RemoteException {
|
|
Parcel parcelObtain = Parcel.obtain();
|
|
Parcel parcelObtain2 = Parcel.obtain();
|
|
try {
|
|
parcelObtain.writeInterfaceToken(Stub.DESCRIPTOR);
|
|
parcelObtain.writeInt(i);
|
|
if (!this.mRemote.transact(2, parcelObtain, parcelObtain2, 0) && Stub.getDefaultImpl() != null) {
|
|
return Stub.getDefaultImpl().isAchievementUnlocked(i);
|
|
}
|
|
parcelObtain2.readException();
|
|
return parcelObtain2.readInt() != 0;
|
|
} finally {
|
|
parcelObtain2.recycle();
|
|
parcelObtain.recycle();
|
|
}
|
|
}
|
|
|
|
@Override // com.peaky.binders.IPeakyService
|
|
public void enableDebugMode(boolean z) throws RemoteException {
|
|
Parcel parcelObtain = Parcel.obtain();
|
|
Parcel parcelObtain2 = Parcel.obtain();
|
|
try {
|
|
parcelObtain.writeInterfaceToken(Stub.DESCRIPTOR);
|
|
parcelObtain.writeInt(z ? 1 : 0);
|
|
if (!this.mRemote.transact(3, parcelObtain, parcelObtain2, 0) && Stub.getDefaultImpl() != null) {
|
|
Stub.getDefaultImpl().enableDebugMode(z);
|
|
} else {
|
|
parcelObtain2.readException();
|
|
}
|
|
} finally {
|
|
parcelObtain2.recycle();
|
|
parcelObtain.recycle();
|
|
}
|
|
}
|
|
}
|
|
|
|
public static boolean setDefaultImpl(IPeakyService iPeakyService) {
|
|
if (Proxy.sDefaultImpl != null) {
|
|
throw new IllegalStateException("setDefaultImpl() called twice");
|
|
}
|
|
if (iPeakyService == null) {
|
|
return false;
|
|
}
|
|
Proxy.sDefaultImpl = iPeakyService;
|
|
return true;
|
|
}
|
|
|
|
public static IPeakyService getDefaultImpl() {
|
|
return Proxy.sDefaultImpl;
|
|
}
|
|
}
|
|
} |