package android.support.v4.media;

import Mqv2r_3.KQgRr5e_0.KQgRr5e_0.QxJ9d_1.Mqv2r_3;
import Mqv2r_3.KQgRr5e_0.KQgRr5e_0.QxJ9d_1.PGPF6hQ_2;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.media.session.MediaSessionCompat;
import android.text.TextUtils;
/* loaded from: classes.dex */
public final class MediaDescriptionCompat implements Parcelable {
    public static final Parcelable.Creator<MediaDescriptionCompat> CREATOR = new KQgRr5e_0();
    public final Bitmap KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Uri f1794KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Bundle f1795KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final CharSequence f1796KQgRr5e_0;

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

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final String f1798KQgRr5e_0;
    public final CharSequence PGPF6hQ_2;
    public final Uri QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public final CharSequence f1799QxJ9d_1;

    /* loaded from: classes.dex */
    public static final class QxJ9d_1 {
        public Bitmap KQgRr5e_0;

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

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

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

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public String f1803KQgRr5e_0;
        public CharSequence PGPF6hQ_2;
        public Uri QxJ9d_1;

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public CharSequence f1804QxJ9d_1;

        public QxJ9d_1 KQgRr5e_0(String str) {
            this.f1803KQgRr5e_0 = str;
            return this;
        }

        public QxJ9d_1 PGPF6hQ_2(CharSequence charSequence) {
            this.f1802KQgRr5e_0 = charSequence;
            return this;
        }

        public QxJ9d_1 QxJ9d_1(CharSequence charSequence) {
            this.f1804QxJ9d_1 = charSequence;
            return this;
        }

        public QxJ9d_1 KQgRr5e_0(CharSequence charSequence) {
            this.PGPF6hQ_2 = charSequence;
            return this;
        }

        public QxJ9d_1 QxJ9d_1(Uri uri) {
            this.QxJ9d_1 = uri;
            return this;
        }

        public QxJ9d_1 KQgRr5e_0(Bitmap bitmap) {
            this.KQgRr5e_0 = bitmap;
            return this;
        }

        public QxJ9d_1 KQgRr5e_0(Uri uri) {
            this.f1800KQgRr5e_0 = uri;
            return this;
        }

        public QxJ9d_1 KQgRr5e_0(Bundle bundle) {
            this.f1801KQgRr5e_0 = bundle;
            return this;
        }

        public MediaDescriptionCompat KQgRr5e_0() {
            return new MediaDescriptionCompat(this.f1803KQgRr5e_0, this.f1802KQgRr5e_0, this.f1804QxJ9d_1, this.PGPF6hQ_2, this.KQgRr5e_0, this.f1800KQgRr5e_0, this.f1801KQgRr5e_0, this.QxJ9d_1);
        }
    }

    public MediaDescriptionCompat(String str, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, Bitmap bitmap, Uri uri, Bundle bundle, Uri uri2) {
        this.f1798KQgRr5e_0 = str;
        this.f1796KQgRr5e_0 = charSequence;
        this.f1799QxJ9d_1 = charSequence2;
        this.PGPF6hQ_2 = charSequence3;
        this.KQgRr5e_0 = bitmap;
        this.f1794KQgRr5e_0 = uri;
        this.f1795KQgRr5e_0 = bundle;
        this.QxJ9d_1 = uri2;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public String m818KQgRr5e_0() {
        return this.f1798KQgRr5e_0;
    }

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

    public String toString() {
        return ((Object) this.f1796KQgRr5e_0) + ", " + ((Object) this.f1799QxJ9d_1) + ", " + ((Object) this.PGPF6hQ_2);
    }

    @Override // android.os.Parcelable
    public void writeToParcel(Parcel parcel, int i) {
        if (Build.VERSION.SDK_INT < 21) {
            parcel.writeString(this.f1798KQgRr5e_0);
            TextUtils.writeToParcel(this.f1796KQgRr5e_0, parcel, i);
            TextUtils.writeToParcel(this.f1799QxJ9d_1, parcel, i);
            TextUtils.writeToParcel(this.PGPF6hQ_2, parcel, i);
            parcel.writeParcelable(this.KQgRr5e_0, i);
            parcel.writeParcelable(this.f1794KQgRr5e_0, i);
            parcel.writeBundle(this.f1795KQgRr5e_0);
            parcel.writeParcelable(this.QxJ9d_1, i);
            return;
        }
        PGPF6hQ_2.KQgRr5e_0(KQgRr5e_0(), parcel, i);
    }

    public Object KQgRr5e_0() {
        if (this.f1797KQgRr5e_0 == null && Build.VERSION.SDK_INT >= 21) {
            Object KQgRr5e_02 = PGPF6hQ_2.KQgRr5e_0.KQgRr5e_0();
            PGPF6hQ_2.KQgRr5e_0.KQgRr5e_0(KQgRr5e_02, this.f1798KQgRr5e_0);
            PGPF6hQ_2.KQgRr5e_0.PGPF6hQ_2(KQgRr5e_02, this.f1796KQgRr5e_0);
            PGPF6hQ_2.KQgRr5e_0.QxJ9d_1(KQgRr5e_02, this.f1799QxJ9d_1);
            PGPF6hQ_2.KQgRr5e_0.KQgRr5e_0(KQgRr5e_02, this.PGPF6hQ_2);
            PGPF6hQ_2.KQgRr5e_0.KQgRr5e_0(KQgRr5e_02, this.KQgRr5e_0);
            PGPF6hQ_2.KQgRr5e_0.KQgRr5e_0(KQgRr5e_02, this.f1794KQgRr5e_0);
            Bundle bundle = this.f1795KQgRr5e_0;
            if (Build.VERSION.SDK_INT < 23 && this.QxJ9d_1 != null) {
                if (bundle == null) {
                    bundle = new Bundle();
                    bundle.putBoolean("android.support.v4.media.description.NULL_BUNDLE_FLAG", true);
                }
                bundle.putParcelable("android.support.v4.media.description.MEDIA_URI", this.QxJ9d_1);
            }
            PGPF6hQ_2.KQgRr5e_0.KQgRr5e_0(KQgRr5e_02, bundle);
            if (Build.VERSION.SDK_INT >= 23) {
                Mqv2r_3.KQgRr5e_0.KQgRr5e_0(KQgRr5e_02, this.QxJ9d_1);
            }
            Object KQgRr5e_03 = PGPF6hQ_2.KQgRr5e_0.KQgRr5e_0(KQgRr5e_02);
            this.f1797KQgRr5e_0 = KQgRr5e_03;
            return KQgRr5e_03;
        }
        return this.f1797KQgRr5e_0;
    }

    /* loaded from: classes.dex */
    public static class KQgRr5e_0 implements Parcelable.Creator<MediaDescriptionCompat> {
        @Override // android.os.Parcelable.Creator
        /* renamed from: KQgRr5e_0 */
        public MediaDescriptionCompat createFromParcel(Parcel parcel) {
            if (Build.VERSION.SDK_INT < 21) {
                return new MediaDescriptionCompat(parcel);
            }
            return MediaDescriptionCompat.KQgRr5e_0(PGPF6hQ_2.KQgRr5e_0(parcel));
        }

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

    public MediaDescriptionCompat(Parcel parcel) {
        this.f1798KQgRr5e_0 = parcel.readString();
        this.f1796KQgRr5e_0 = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
        this.f1799QxJ9d_1 = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
        this.PGPF6hQ_2 = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
        ClassLoader classLoader = MediaDescriptionCompat.class.getClassLoader();
        this.KQgRr5e_0 = (Bitmap) parcel.readParcelable(classLoader);
        this.f1794KQgRr5e_0 = (Uri) parcel.readParcelable(classLoader);
        this.f1795KQgRr5e_0 = parcel.readBundle(classLoader);
        this.QxJ9d_1 = (Uri) parcel.readParcelable(classLoader);
    }

    /* JADX WARN: Removed duplicated region for block: B:20:0x0069  */
    /* JADX WARN: Removed duplicated region for block: B:21:0x006d  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static MediaDescriptionCompat KQgRr5e_0(Object obj) {
        Uri uri;
        Bundle bundle = null;
        if (obj == null || Build.VERSION.SDK_INT < 21) {
            return null;
        }
        QxJ9d_1 qxJ9d_1 = new QxJ9d_1();
        qxJ9d_1.KQgRr5e_0(PGPF6hQ_2.m155KQgRr5e_0(obj));
        qxJ9d_1.PGPF6hQ_2(PGPF6hQ_2.PGPF6hQ_2(obj));
        qxJ9d_1.QxJ9d_1(PGPF6hQ_2.QxJ9d_1(obj));
        qxJ9d_1.KQgRr5e_0(PGPF6hQ_2.m154KQgRr5e_0(obj));
        qxJ9d_1.KQgRr5e_0(PGPF6hQ_2.KQgRr5e_0(obj));
        qxJ9d_1.KQgRr5e_0(PGPF6hQ_2.m152KQgRr5e_0(obj));
        Bundle m153KQgRr5e_0 = PGPF6hQ_2.m153KQgRr5e_0(obj);
        if (m153KQgRr5e_0 != null) {
            MediaSessionCompat.KQgRr5e_0(m153KQgRr5e_0);
            uri = (Uri) m153KQgRr5e_0.getParcelable("android.support.v4.media.description.MEDIA_URI");
        } else {
            uri = null;
        }
        if (uri != null) {
            if (!m153KQgRr5e_0.containsKey("android.support.v4.media.description.NULL_BUNDLE_FLAG") || m153KQgRr5e_0.size() != 2) {
                m153KQgRr5e_0.remove("android.support.v4.media.description.MEDIA_URI");
                m153KQgRr5e_0.remove("android.support.v4.media.description.NULL_BUNDLE_FLAG");
            }
            qxJ9d_1.KQgRr5e_0(bundle);
            if (uri == null) {
                qxJ9d_1.QxJ9d_1(uri);
            } else if (Build.VERSION.SDK_INT >= 23) {
                qxJ9d_1.QxJ9d_1(Mqv2r_3.KQgRr5e_0(obj));
            }
            MediaDescriptionCompat KQgRr5e_02 = qxJ9d_1.KQgRr5e_0();
            KQgRr5e_02.f1797KQgRr5e_0 = obj;
            return KQgRr5e_02;
        }
        bundle = m153KQgRr5e_0;
        qxJ9d_1.KQgRr5e_0(bundle);
        if (uri == null) {
        }
        MediaDescriptionCompat KQgRr5e_022 = qxJ9d_1.KQgRr5e_0();
        KQgRr5e_022.f1797KQgRr5e_0 = obj;
        return KQgRr5e_022;
    }
}
