package androidx.media;

import Z0.o;
import java.util.Arrays;

/* JADX INFO: loaded from: classes.dex */
public class AudioAttributesImplBase implements AudioAttributesImpl {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f12208a = 0;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f12209b = 0;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f12210c = 0;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public int f12211d = -1;

    public final boolean equals(Object obj) {
        int i6;
        if (!(obj instanceof AudioAttributesImplBase)) {
            return false;
        }
        AudioAttributesImplBase audioAttributesImplBase = (AudioAttributesImplBase) obj;
        if (this.f12209b == audioAttributesImplBase.f12209b) {
            int i7 = this.f12210c;
            int i8 = audioAttributesImplBase.f12210c;
            int i9 = audioAttributesImplBase.f12211d;
            if (i9 == -1) {
                int i10 = audioAttributesImplBase.f12208a;
                int i11 = AudioAttributesCompat.f12204b;
                if ((i8 & 1) != 1) {
                    if ((i8 & 4) != 4) {
                        switch (i10) {
                            case 2:
                                i6 = 0;
                                break;
                            case 3:
                                i6 = 8;
                                break;
                            case 4:
                                i6 = 4;
                                break;
                            case 5:
                            case 7:
                            case 8:
                            case 9:
                            case 10:
                                i6 = 5;
                                break;
                            case 6:
                                i6 = 2;
                                break;
                            case 11:
                                i6 = 10;
                                break;
                            case 12:
                            default:
                                i6 = 3;
                                break;
                            case 13:
                                i6 = 1;
                                break;
                        }
                    } else {
                        i6 = 6;
                    }
                } else {
                    i6 = 7;
                }
            } else {
                i6 = i9;
            }
            if (i6 == 6) {
                i8 |= 4;
            } else if (i6 == 7) {
                i8 |= 1;
            }
            if (i7 == (i8 & 273) && this.f12208a == audioAttributesImplBase.f12208a && this.f12211d == i9) {
                return true;
            }
        }
        return false;
    }

    public final int hashCode() {
        return Arrays.hashCode(new Object[]{Integer.valueOf(this.f12209b), Integer.valueOf(this.f12210c), Integer.valueOf(this.f12208a), Integer.valueOf(this.f12211d)});
    }

    public final String toString() {
        String strL;
        StringBuilder sb = new StringBuilder("AudioAttributesCompat:");
        if (this.f12211d != -1) {
            sb.append(" stream=");
            sb.append(this.f12211d);
            sb.append(" derived");
        }
        sb.append(" usage=");
        int i6 = this.f12208a;
        int i7 = AudioAttributesCompat.f12204b;
        switch (i6) {
            case 0:
                strL = "USAGE_UNKNOWN";
                break;
            case 1:
                strL = "USAGE_MEDIA";
                break;
            case 2:
                strL = "USAGE_VOICE_COMMUNICATION";
                break;
            case 3:
                strL = "USAGE_VOICE_COMMUNICATION_SIGNALLING";
                break;
            case 4:
                strL = "USAGE_ALARM";
                break;
            case 5:
                strL = "USAGE_NOTIFICATION";
                break;
            case 6:
                strL = "USAGE_NOTIFICATION_RINGTONE";
                break;
            case 7:
                strL = "USAGE_NOTIFICATION_COMMUNICATION_REQUEST";
                break;
            case 8:
                strL = "USAGE_NOTIFICATION_COMMUNICATION_INSTANT";
                break;
            case 9:
                strL = "USAGE_NOTIFICATION_COMMUNICATION_DELAYED";
                break;
            case 10:
                strL = "USAGE_NOTIFICATION_EVENT";
                break;
            case 11:
                strL = "USAGE_ASSISTANCE_ACCESSIBILITY";
                break;
            case 12:
                strL = "USAGE_ASSISTANCE_NAVIGATION_GUIDANCE";
                break;
            case 13:
                strL = "USAGE_ASSISTANCE_SONIFICATION";
                break;
            case 14:
                strL = "USAGE_GAME";
                break;
            case 15:
            default:
                strL = o.l("unknown usage ", i6);
                break;
            case 16:
                strL = "USAGE_ASSISTANT";
                break;
        }
        sb.append(strL);
        sb.append(" content=");
        sb.append(this.f12209b);
        sb.append(" flags=0x");
        sb.append(Integer.toHexString(this.f12210c).toUpperCase());
        return sb.toString();
    }
}
