discord-jadx/app/src/main/java/android/support/v4/os/ResultReceiver.java

85 lines
2.6 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package android.support.v4.os;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import androidx.annotation.RestrictTo;
import java.util.Objects;
2021-11-08 18:25:28 +00:00
import x.a.b.c.a;
2021-06-27 20:44:35 +00:00
@SuppressLint({"BanParcelableUsage"})
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public class ResultReceiver implements Parcelable {
public static final Parcelable.Creator<ResultReceiver> CREATOR = new a();
2021-12-17 22:03:14 +00:00
public x.a.b.c.a j;
2021-06-27 20:44:35 +00:00
public class a implements Parcelable.Creator<ResultReceiver> {
/* Return type fixed from 'java.lang.Object' to match base method */
@Override // android.os.Parcelable.Creator
public ResultReceiver createFromParcel(Parcel parcel) {
return new ResultReceiver(parcel);
}
/* Return type fixed from 'java.lang.Object[]' to match base method */
@Override // android.os.Parcelable.Creator
public ResultReceiver[] newArray(int i) {
return new ResultReceiver[i];
}
}
2022-02-01 19:18:35 +00:00
public class b extends a.AbstractBinderC0358a {
2021-06-27 20:44:35 +00:00
public b() {
}
2021-11-08 18:25:28 +00:00
@Override // x.a.b.c.a
2022-01-27 00:50:41 +00:00
public void r0(int i, Bundle bundle) {
2021-06-27 20:44:35 +00:00
Objects.requireNonNull(ResultReceiver.this);
ResultReceiver.this.a(i, bundle);
}
}
public ResultReceiver(Parcel parcel) {
2021-11-08 18:25:28 +00:00
x.a.b.c.a aVar;
2021-06-27 20:44:35 +00:00
IBinder readStrongBinder = parcel.readStrongBinder();
2022-02-01 19:18:35 +00:00
int i = a.AbstractBinderC0358a.a;
2021-06-27 20:44:35 +00:00
if (readStrongBinder == null) {
aVar = null;
} else {
IInterface queryLocalInterface = readStrongBinder.queryLocalInterface("android.support.v4.os.IResultReceiver");
2022-02-01 19:18:35 +00:00
aVar = (queryLocalInterface == null || !(queryLocalInterface instanceof x.a.b.c.a)) ? new a.AbstractBinderC0358a.C0359a(readStrongBinder) : (x.a.b.c.a) queryLocalInterface;
2021-06-27 20:44:35 +00:00
}
2021-12-17 22:03:14 +00:00
this.j = aVar;
2021-06-27 20:44:35 +00:00
}
public void a(int i, Bundle bundle) {
}
public void b(int i, Bundle bundle) {
2021-12-17 22:03:14 +00:00
x.a.b.c.a aVar = this.j;
2021-06-27 20:44:35 +00:00
if (aVar != null) {
try {
2022-01-27 00:50:41 +00:00
aVar.r0(i, bundle);
2021-06-27 20:44:35 +00:00
} catch (RemoteException unused) {
}
}
}
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
synchronized (this) {
2021-12-17 22:03:14 +00:00
if (this.j == null) {
this.j = new b();
2021-06-27 20:44:35 +00:00
}
2021-12-17 22:03:14 +00:00
parcel.writeStrongBinder(this.j.asBinder());
2021-06-27 20:44:35 +00:00
}
}
}