package android.support.v4.os;

import Mqv2r_3.KQgRr5e_0.KQgRr5e_0.PGPF6hQ_2.KQgRr5e_0;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
@SuppressLint({"BanParcelableUsage"})
/* loaded from: classes.dex */
public class ResultReceiver implements Parcelable {
    public static final Parcelable.Creator<ResultReceiver> CREATOR = new KQgRr5e_0();
    public Mqv2r_3.KQgRr5e_0.KQgRr5e_0.PGPF6hQ_2.KQgRr5e_0 KQgRr5e_0;
    public final boolean QxJ9d_1 = false;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Handler f1823KQgRr5e_0 = null;

    /* loaded from: classes.dex */
    public static class KQgRr5e_0 implements Parcelable.Creator<ResultReceiver> {
        @Override // android.os.Parcelable.Creator
        /* renamed from: KQgRr5e_0 */
        public ResultReceiver createFromParcel(Parcel parcel) {
            return new ResultReceiver(parcel);
        }

        @Override // android.os.Parcelable.Creator
        /* renamed from: KQgRr5e_0 */
        public ResultReceiver[] newArray(int i) {
            return new ResultReceiver[i];
        }
    }

    /* loaded from: classes.dex */
    public class PGPF6hQ_2 implements Runnable {
        public final int KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final Bundle f1824KQgRr5e_0;

        public PGPF6hQ_2(int i, Bundle bundle) {
            this.KQgRr5e_0 = i;
            this.f1824KQgRr5e_0 = bundle;
        }

        @Override // java.lang.Runnable
        public void run() {
            ResultReceiver.this.KQgRr5e_0(this.KQgRr5e_0, this.f1824KQgRr5e_0);
        }
    }

    /* loaded from: classes.dex */
    public class QxJ9d_1 extends KQgRr5e_0.AbstractBinderC0025KQgRr5e_0 {
        public QxJ9d_1() {
        }

        @Override // Mqv2r_3.KQgRr5e_0.KQgRr5e_0.PGPF6hQ_2.KQgRr5e_0
        public void KQgRr5e_0(int i, Bundle bundle) {
            ResultReceiver resultReceiver = ResultReceiver.this;
            Handler handler = resultReceiver.f1823KQgRr5e_0;
            if (handler != null) {
                handler.post(new PGPF6hQ_2(i, bundle));
            } else {
                resultReceiver.KQgRr5e_0(i, bundle);
            }
        }
    }

    public ResultReceiver(Parcel parcel) {
        this.KQgRr5e_0 = KQgRr5e_0.AbstractBinderC0025KQgRr5e_0.KQgRr5e_0(parcel.readStrongBinder());
    }

    public void KQgRr5e_0(int i, Bundle bundle) {
    }

    public void QxJ9d_1(int i, Bundle bundle) {
        if (this.QxJ9d_1) {
            Handler handler = this.f1823KQgRr5e_0;
            if (handler != null) {
                handler.post(new PGPF6hQ_2(i, bundle));
                return;
            } else {
                KQgRr5e_0(i, bundle);
                return;
            }
        }
        Mqv2r_3.KQgRr5e_0.KQgRr5e_0.PGPF6hQ_2.KQgRr5e_0 kQgRr5e_0 = this.KQgRr5e_0;
        if (kQgRr5e_0 != null) {
            try {
                kQgRr5e_0.KQgRr5e_0(i, bundle);
            } 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) {
            if (this.KQgRr5e_0 == null) {
                this.KQgRr5e_0 = new QxJ9d_1();
            }
            parcel.writeStrongBinder(this.KQgRr5e_0.asBinder());
        }
    }
}
