package androidx.media;

import X6FRs_4.Eps4cJe_18.PGPF6hQ_2;
import X6FRs_4.WwEq_13.KQgRr5e_0;
import android.util.SparseIntArray;
/* loaded from: classes.dex */
public class AudioAttributesCompat implements PGPF6hQ_2 {
    public static final SparseIntArray KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public KQgRr5e_0 f2365KQgRr5e_0;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        KQgRr5e_0 = sparseIntArray;
        sparseIntArray.put(5, 1);
        KQgRr5e_0.put(6, 2);
        KQgRr5e_0.put(7, 2);
        KQgRr5e_0.put(8, 1);
        KQgRr5e_0.put(9, 1);
        KQgRr5e_0.put(10, 1);
    }

    public static String KQgRr5e_0(int i) {
        switch (i) {
            case 0:
                return "USAGE_UNKNOWN";
            case 1:
                return "USAGE_MEDIA";
            case 2:
                return "USAGE_VOICE_COMMUNICATION";
            case 3:
                return "USAGE_VOICE_COMMUNICATION_SIGNALLING";
            case 4:
                return "USAGE_ALARM";
            case 5:
                return "USAGE_NOTIFICATION";
            case 6:
                return "USAGE_NOTIFICATION_RINGTONE";
            case 7:
                return "USAGE_NOTIFICATION_COMMUNICATION_REQUEST";
            case 8:
                return "USAGE_NOTIFICATION_COMMUNICATION_INSTANT";
            case 9:
                return "USAGE_NOTIFICATION_COMMUNICATION_DELAYED";
            case 10:
                return "USAGE_NOTIFICATION_EVENT";
            case 11:
                return "USAGE_ASSISTANCE_ACCESSIBILITY";
            case 12:
                return "USAGE_ASSISTANCE_NAVIGATION_GUIDANCE";
            case 13:
                return "USAGE_ASSISTANCE_SONIFICATION";
            case 14:
                return "USAGE_GAME";
            case 15:
            default:
                return "unknown usage " + i;
            case 16:
                return "USAGE_ASSISTANT";
        }
    }

    public boolean equals(Object obj) {
        if (obj instanceof AudioAttributesCompat) {
            AudioAttributesCompat audioAttributesCompat = (AudioAttributesCompat) obj;
            KQgRr5e_0 kQgRr5e_0 = this.f2365KQgRr5e_0;
            if (kQgRr5e_0 == null) {
                return audioAttributesCompat.f2365KQgRr5e_0 == null;
            }
            return kQgRr5e_0.equals(audioAttributesCompat.f2365KQgRr5e_0);
        }
        return false;
    }

    public int hashCode() {
        return this.f2365KQgRr5e_0.hashCode();
    }

    public String toString() {
        return this.f2365KQgRr5e_0.toString();
    }

    public static int KQgRr5e_0(boolean z, int i, int i2) {
        if ((i & 1) == 1) {
            return z ? 1 : 7;
        } else if ((i & 4) == 4) {
            return z ? 0 : 6;
        } else {
            switch (i2) {
                case 0:
                    if (z) {
                        return X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID;
                    }
                    return 3;
                case 1:
                case 12:
                case 14:
                case 16:
                    return 3;
                case 2:
                    return 0;
                case 3:
                    return z ? 0 : 8;
                case 4:
                    return 4;
                case 5:
                case 7:
                case 8:
                case 9:
                case 10:
                    return 5;
                case 6:
                    return 2;
                case 11:
                    return 10;
                case 13:
                    return 1;
                case 15:
                default:
                    if (z) {
                        throw new IllegalArgumentException("Unknown usage value " + i2 + " in audio attributes");
                    }
                    return 3;
            }
        }
    }
}
