package androidx.activity.result;

import android.content.Intent;
import android.os.Parcel;
import android.os.Parcelable;

/* renamed from: androidx.activity.result.a */
/* loaded from: classes.dex */
public final class C0068a implements Parcelable {
    public static final Parcelable.Creator<C0068a> CREATOR = new C0069a();

    /* renamed from: d */
    public final int f77d;

    /* renamed from: e */
    public final Intent f78e;

    /* renamed from: androidx.activity.result.a$a */
    /* loaded from: classes.dex */
    public class C0069a implements Parcelable.Creator<C0068a> {
        @Override // android.os.Parcelable.Creator
        /* renamed from: a */
        public C0068a createFromParcel(Parcel parcel) {
            return new C0068a(parcel);
        }

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

    public C0068a(int i, Intent intent) {
        this.f77d = i;
        this.f78e = intent;
    }

    public C0068a(Parcel parcel) {
        this.f77d = parcel.readInt();
        this.f78e = parcel.readInt() == 0 ? null : (Intent) Intent.CREATOR.createFromParcel(parcel);
    }

    /* renamed from: c */
    public static String m4994c(int i) {
        return i != -1 ? i != 0 ? String.valueOf(i) : "RESULT_CANCELED" : "RESULT_OK";
    }

    /* renamed from: a */
    public Intent m4996a() {
        return this.f78e;
    }

    /* renamed from: b */
    public int m4995b() {
        return this.f77d;
    }

    @Override // android.os.Parcelable
    public int describeContents() {
        return 0;
    }

    public String toString() {
        return "ActivityResult{resultCode=" + m4994c(this.f77d) + ", data=" + this.f78e + '}';
    }

    @Override // android.os.Parcelable
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(this.f77d);
        parcel.writeInt(this.f78e == null ? 0 : 1);
        Intent intent = this.f78e;
        if (intent != null) {
            intent.writeToParcel(parcel, i);
        }
    }
}