Rabbit-R1/android (non root)/java/sources/androidx/work/multiprocess/IWorkManagerImplCallback.java
2024-05-21 17:08:36 -04:00

121 lines
4.1 KiB
Java

package androidx.work.multiprocess;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import kotlin.text.Typography;
/* loaded from: classes2.dex */
public interface IWorkManagerImplCallback extends IInterface {
public static final String DESCRIPTOR = "androidx$work$multiprocess$IWorkManagerImplCallback".replace(Typography.dollar, '.');
/* loaded from: classes2.dex */
public static class Default implements IWorkManagerImplCallback {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // androidx.work.multiprocess.IWorkManagerImplCallback
public void onFailure(String error) throws RemoteException {
}
@Override // androidx.work.multiprocess.IWorkManagerImplCallback
public void onSuccess(byte[] response) throws RemoteException {
}
}
void onFailure(String error) throws RemoteException;
void onSuccess(byte[] response) throws RemoteException;
/* loaded from: classes2.dex */
public static abstract class Stub extends Binder implements IWorkManagerImplCallback {
static final int TRANSACTION_onFailure = 2;
static final int TRANSACTION_onSuccess = 1;
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, DESCRIPTOR);
}
public static IWorkManagerImplCallback asInterface(IBinder obj) {
if (obj == null) {
return null;
}
IInterface queryLocalInterface = obj.queryLocalInterface(DESCRIPTOR);
if (queryLocalInterface != null && (queryLocalInterface instanceof IWorkManagerImplCallback)) {
return (IWorkManagerImplCallback) queryLocalInterface;
}
return new Proxy(obj);
}
@Override // android.os.Binder
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
String str = DESCRIPTOR;
if (code >= 1 && code <= 16777215) {
data.enforceInterface(str);
}
if (code == 1598968902) {
reply.writeString(str);
return true;
}
if (code == 1) {
onSuccess(data.createByteArray());
} else if (code == 2) {
onFailure(data.readString());
} else {
return super.onTransact(code, data, reply, flags);
}
return true;
}
/* loaded from: classes2.dex */
private static class Proxy implements IWorkManagerImplCallback {
private IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
Proxy(IBinder remote) {
this.mRemote = remote;
}
public String getInterfaceDescriptor() {
return DESCRIPTOR;
}
@Override // androidx.work.multiprocess.IWorkManagerImplCallback
public void onSuccess(byte[] response) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(DESCRIPTOR);
obtain.writeByteArray(response);
this.mRemote.transact(1, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // androidx.work.multiprocess.IWorkManagerImplCallback
public void onFailure(String error) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(DESCRIPTOR);
obtain.writeString(error);
this.mRemote.transact(2, obtain, null, 1);
} finally {
obtain.recycle();
}
}
}
}
}