package p138.p176.p177.p190.p210.p213;

import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import java.util.List;
import java.util.Map;
import p000.p001.p002.p003.p004.C0567;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p190.C3431;
import p138.p176.p177.p190.p210.C3710;
import p138.p176.p177.p190.p210.C3713;
import p138.p176.p177.p190.p239.C4150;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ഺ.އ.ؠ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C3729 implements C3710.InterfaceC3712 {
    public static final Parcelable.Creator<C3729> CREATOR = new C3730();

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final int f11477;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final String f11478;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final String f11479;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public final String f11480;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public final boolean f11481;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public final int f11482;

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ഺ.އ.ؠ$֏, reason: contains not printable characters */
    public static class C3730 implements Parcelable.Creator<C3729> {
        @Override // android.os.Parcelable.Creator
        public C3729 createFromParcel(Parcel parcel) {
            return new C3729(parcel);
        }

        @Override // android.os.Parcelable.Creator
        public C3729[] newArray(int i) {
            return new C3729[i];
        }
    }

    public C3729(int i, String str, String str2, String str3, boolean z, int i2) {
        C0567.m1896(i2 == -1 || i2 > 0);
        this.f11477 = i;
        this.f11478 = str;
        this.f11479 = str2;
        this.f11480 = str3;
        this.f11481 = z;
        this.f11482 = i2;
    }

    public C3729(Parcel parcel) {
        this.f11477 = parcel.readInt();
        this.f11478 = parcel.readString();
        this.f11479 = parcel.readString();
        this.f11480 = parcel.readString();
        this.f11481 = C4150.m6768(parcel);
        this.f11482 = parcel.readInt();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static C3729 m6066(Map<String, List<String>> map) {
        boolean z;
        int i;
        String str;
        String str2;
        String str3;
        boolean zEquals;
        int i2;
        List<String> list = map.get("icy-br");
        int i3 = -1;
        boolean z2 = true;
        if (list != null) {
            String str4 = list.get(0);
            try {
                i2 = Integer.parseInt(str4) * 1000;
                if (i2 > 0) {
                    z = true;
                } else {
                    try {
                        Log.w("IcyHeaders", "Invalid bitrate: " + str4);
                        z = false;
                        i2 = -1;
                    } catch (NumberFormatException unused) {
                        C2803.m4901("Invalid bitrate header: ", str4, "IcyHeaders");
                        z = false;
                    }
                }
            } catch (NumberFormatException unused2) {
                i2 = -1;
            }
            i = i2;
        } else {
            z = false;
            i = -1;
        }
        List<String> list2 = map.get("icy-genre");
        if (list2 != null) {
            str = list2.get(0);
            z = true;
        } else {
            str = null;
        }
        List<String> list3 = map.get("icy-name");
        if (list3 != null) {
            str2 = list3.get(0);
            z = true;
        } else {
            str2 = null;
        }
        List<String> list4 = map.get("icy-url");
        if (list4 != null) {
            str3 = list4.get(0);
            z = true;
        } else {
            str3 = null;
        }
        List<String> list5 = map.get("icy-pub");
        if (list5 != null) {
            zEquals = list5.get(0).equals("1");
            z = true;
        } else {
            zEquals = false;
        }
        List<String> list6 = map.get("icy-metaint");
        if (list6 != null) {
            String str5 = list6.get(0);
            try {
                int i4 = Integer.parseInt(str5);
                if (i4 > 0) {
                    i3 = i4;
                } else {
                    try {
                        Log.w("IcyHeaders", "Invalid metadata interval: " + str5);
                        z2 = z;
                    } catch (NumberFormatException unused3) {
                        i3 = i4;
                        C2803.m4901("Invalid metadata interval: ", str5, "IcyHeaders");
                    }
                }
                z = z2;
            } catch (NumberFormatException unused4) {
            }
        }
        if (z) {
            return new C3729(i, str, str2, str3, zEquals, i3);
        }
        return null;
    }

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

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || C3729.class != obj.getClass()) {
            return false;
        }
        C3729 c3729 = (C3729) obj;
        return this.f11477 == c3729.f11477 && C4150.m6769((Object) this.f11478, (Object) c3729.f11478) && C4150.m6769((Object) this.f11479, (Object) c3729.f11479) && C4150.m6769((Object) this.f11480, (Object) c3729.f11480) && this.f11481 == c3729.f11481 && this.f11482 == c3729.f11482;
    }

    public int hashCode() {
        int i = (527 + this.f11477) * 31;
        String str = this.f11478;
        int iHashCode = (i + (str != null ? str.hashCode() : 0)) * 31;
        String str2 = this.f11479;
        int iHashCode2 = (iHashCode + (str2 != null ? str2.hashCode() : 0)) * 31;
        String str3 = this.f11480;
        return ((((iHashCode2 + (str3 != null ? str3.hashCode() : 0)) * 31) + (this.f11481 ? 1 : 0)) * 31) + this.f11482;
    }

    public String toString() {
        StringBuilder sbM4889 = C2803.m4889("IcyHeaders: name=\"");
        sbM4889.append(this.f11479);
        sbM4889.append("\", genre=\"");
        sbM4889.append(this.f11478);
        sbM4889.append("\", bitrate=");
        sbM4889.append(this.f11477);
        sbM4889.append(", metadataInterval=");
        sbM4889.append(this.f11482);
        return sbM4889.toString();
    }

    @Override // android.os.Parcelable
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(this.f11477);
        parcel.writeString(this.f11478);
        parcel.writeString(this.f11479);
        parcel.writeString(this.f11480);
        C4150.m6763(parcel, this.f11481);
        parcel.writeInt(this.f11482);
    }

    @Override // p138.p176.p177.p190.p210.C3710.InterfaceC3712
    /* JADX INFO: renamed from: ފ */
    public /* synthetic */ C3431 mo5966() {
        return C3713.m6058(this);
    }

    @Override // p138.p176.p177.p190.p210.C3710.InterfaceC3712
    /* JADX INFO: renamed from: ލ */
    public /* synthetic */ byte[] mo5967() {
        return C3713.m6057(this);
    }
}
