package e8;

import android.app.PendingIntent;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bytedance.sdk.component.pglcrypt.PglCryptUtils;
import com.google.android.gms.common.annotation.KeepForSdk;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable$Constructor;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable$Field;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable$Param;
import java.util.Arrays;
import n7.c4;

/* JADX INFO: loaded from: classes2.dex */
public final class b extends f8.a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f25513a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final int f25514b;

    @Nullable
    @SafeParcelable$Field(getter = "getResolution", id = 3)
    private final PendingIntent zzc;

    @Nullable
    @SafeParcelable$Field(getter = "getErrorMessage", id = 4)
    private final String zzd;

    @Nullable
    @SafeParcelable$Field(getter = "getClientMethodKey", id = 5)
    private final Integer zze;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final b f25512c = new b(0, null, null);

    @NonNull
    public static final Parcelable.Creator<b> CREATOR = new c4(20);

    @SafeParcelable$Constructor
    public b(@SafeParcelable$Param(id = 1) int i10, @SafeParcelable$Param(id = 2) int i11, @Nullable @SafeParcelable$Param(id = 3) PendingIntent pendingIntent, @Nullable @SafeParcelable$Param(id = 4) String str, @Nullable @SafeParcelable$Param(id = 5) Integer num) {
        this.f25513a = i10;
        this.f25514b = i11;
        this.zzc = pendingIntent;
        this.zzd = str;
        this.zze = num;
    }

    public static String y(int i10) {
        if (i10 == 99) {
            return "UNFINISHED";
        }
        if (i10 == 1500) {
            return "DRIVE_EXTERNAL_STORAGE_REQUIRED";
        }
        switch (i10) {
            case -1:
                return "UNKNOWN";
            case 0:
                return "SUCCESS";
            case 1:
                return "SERVICE_MISSING";
            case 2:
                return "SERVICE_VERSION_UPDATE_REQUIRED";
            case 3:
                return "SERVICE_DISABLED";
            case 4:
                return "SIGN_IN_REQUIRED";
            case 5:
                return "INVALID_ACCOUNT";
            case 6:
                return "RESOLUTION_REQUIRED";
            case 7:
                return "NETWORK_ERROR";
            case 8:
                return "INTERNAL_ERROR";
            case 9:
                return "SERVICE_INVALID";
            case 10:
                return "DEVELOPER_ERROR";
            case 11:
                return "LICENSE_CHECK_FAILED";
            default:
                switch (i10) {
                    case 13:
                        return "CANCELED";
                    case 14:
                        return "TIMEOUT";
                    case 15:
                        return "INTERRUPTED";
                    case 16:
                        return "API_UNAVAILABLE";
                    case 17:
                        return "SIGN_IN_FAILED";
                    case 18:
                        return "SERVICE_UPDATING";
                    case 19:
                        return "SERVICE_MISSING_PERMISSION";
                    case 20:
                        return "RESTRICTED_PROFILE";
                    case 21:
                        return "API_VERSION_UPDATE_REQUIRED";
                    case 22:
                        return "RESOLUTION_ACTIVITY_NOT_FOUND";
                    case 23:
                        return "API_DISABLED";
                    case 24:
                        return "API_DISABLED_FOR_CONNECTION";
                    case 25:
                        return "API_INSTALL_REQUIRED";
                    default:
                        return com.bytedance.sdk.component.adexpress.dynamic.dynamicview.b.g(new StringBuilder(String.valueOf(i10).length() + 20), "UNKNOWN_ERROR_CODE(", i10, ")");
                }
        }
    }

    public boolean equals(@Nullable Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof b)) {
            return false;
        }
        b bVar = (b) obj;
        return this.f25514b == bVar.f25514b && com.google.android.gms.common.internal.v.equal(this.zzc, bVar.zzc) && com.google.android.gms.common.internal.v.equal(this.zzd, bVar.zzd) && com.google.android.gms.common.internal.v.equal(this.zze, bVar.zze);
    }

    @Nullable
    @KeepForSdk
    public Integer getClientMethodKey() {
        return this.zze;
    }

    @Nullable
    public String getErrorMessage() {
        return this.zzd;
    }

    @Nullable
    public PendingIntent getResolution() {
        return this.zzc;
    }

    public final int hashCode() {
        return Arrays.hashCode(new Object[]{Integer.valueOf(this.f25514b), this.zzc, this.zzd, this.zze});
    }

    public final String toString() {
        com.google.android.gms.common.internal.u uVarA = com.google.android.gms.common.internal.v.a(this);
        uVarA.add("statusCode", y(this.f25514b));
        uVarA.add("resolution", this.zzc);
        uVarA.add(PglCryptUtils.KEY_MESSAGE, this.zzd);
        uVarA.add("clientMethodKey", this.zze);
        return uVarA.toString();
    }

    public final boolean w() {
        return (this.f25514b == 0 || this.zzc == null) ? false : true;
    }

    @Override // android.os.Parcelable
    public final void writeToParcel(Parcel parcel, int i10) {
        int I = com.bumptech.glide.g.I(20293, parcel);
        com.bumptech.glide.g.C(parcel, 1, 4);
        parcel.writeInt(this.f25513a);
        com.bumptech.glide.g.C(parcel, 2, 4);
        parcel.writeInt(this.f25514b);
        com.bumptech.glide.g.q(parcel, 3, getResolution(), i10);
        com.bumptech.glide.g.r(parcel, 4, getErrorMessage());
        Integer clientMethodKey = getClientMethodKey();
        if (clientMethodKey != null) {
            com.bumptech.glide.g.C(parcel, 5, 4);
            parcel.writeInt(clientMethodKey.intValue());
        }
        com.bumptech.glide.g.N(I, parcel);
    }

    public final boolean x() {
        return this.f25514b == 0;
    }

    public b(int i10, @Nullable PendingIntent pendingIntent) {
        this(i10, pendingIntent, null);
    }

    public b(int i10, @Nullable PendingIntent pendingIntent, @Nullable String str) {
        this(1, i10, pendingIntent, str, null);
    }

    @KeepForSdk
    public b(int i10, @Nullable PendingIntent pendingIntent, @Nullable String str, @Nullable Integer num) {
        this(1, i10, pendingIntent, str, num);
    }
}
