package android.support.v4.media.session;

import Mqv2r_3.KQgRr5e_0.KQgRr5e_0.QxJ9d_1.IFxWkV_5.IFxWkV_5;
import Mqv2r_3.KQgRr5e_0.KQgRr5e_0.QxJ9d_1.IFxWkV_5.X6FRs_4;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes.dex */
public final class PlaybackStateCompat implements Parcelable {
    public static final Parcelable.Creator<PlaybackStateCompat> CREATOR = new KQgRr5e_0();
    public final float KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final int f1814KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final long f1815KQgRr5e_0;

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

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

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public List<CustomAction> f1818KQgRr5e_0;

    /* renamed from: Mqv2r_3  reason: collision with root package name */
    public final long f3422Mqv2r_3;
    public final long PGPF6hQ_2;
    public final int QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public final long f1819QxJ9d_1;

    /* renamed from: X6FRs_4  reason: collision with root package name */
    public final long f3423X6FRs_4;

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

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

    public PlaybackStateCompat(int i, long j, long j2, float f, long j3, int i2, CharSequence charSequence, long j4, List<CustomAction> list, long j5, Bundle bundle) {
        this.f1814KQgRr5e_0 = i;
        this.f1815KQgRr5e_0 = j;
        this.f1819QxJ9d_1 = j2;
        this.KQgRr5e_0 = f;
        this.PGPF6hQ_2 = j3;
        this.QxJ9d_1 = i2;
        this.f1817KQgRr5e_0 = charSequence;
        this.f3422Mqv2r_3 = j4;
        this.f1818KQgRr5e_0 = new ArrayList(list);
        this.f3423X6FRs_4 = j5;
        this.f1816KQgRr5e_0 = bundle;
    }

    public static PlaybackStateCompat KQgRr5e_0(Object obj) {
        ArrayList arrayList;
        if (obj == null || Build.VERSION.SDK_INT < 21) {
            return null;
        }
        List<Object> m145KQgRr5e_0 = X6FRs_4.m145KQgRr5e_0(obj);
        if (m145KQgRr5e_0 != null) {
            ArrayList arrayList2 = new ArrayList(m145KQgRr5e_0.size());
            for (Object obj2 : m145KQgRr5e_0) {
                arrayList2.add(CustomAction.KQgRr5e_0(obj2));
            }
            arrayList = arrayList2;
        } else {
            arrayList = null;
        }
        return new PlaybackStateCompat(X6FRs_4.m142KQgRr5e_0(obj), X6FRs_4.X6FRs_4(obj), X6FRs_4.PGPF6hQ_2(obj), X6FRs_4.KQgRr5e_0(obj), X6FRs_4.m143KQgRr5e_0(obj), 0, X6FRs_4.m144KQgRr5e_0(obj), X6FRs_4.Mqv2r_3(obj), arrayList, X6FRs_4.QxJ9d_1(obj), Build.VERSION.SDK_INT >= 22 ? IFxWkV_5.KQgRr5e_0(obj) : null);
    }

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

    public String toString() {
        return "PlaybackState {state=" + this.f1814KQgRr5e_0 + ", position=" + this.f1815KQgRr5e_0 + ", buffered position=" + this.f1819QxJ9d_1 + ", speed=" + this.KQgRr5e_0 + ", updated=" + this.f3422Mqv2r_3 + ", actions=" + this.PGPF6hQ_2 + ", error code=" + this.QxJ9d_1 + ", error message=" + this.f1817KQgRr5e_0 + ", custom actions=" + this.f1818KQgRr5e_0 + ", active item id=" + this.f3423X6FRs_4 + "}";
    }

    @Override // android.os.Parcelable
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(this.f1814KQgRr5e_0);
        parcel.writeLong(this.f1815KQgRr5e_0);
        parcel.writeFloat(this.KQgRr5e_0);
        parcel.writeLong(this.f3422Mqv2r_3);
        parcel.writeLong(this.f1819QxJ9d_1);
        parcel.writeLong(this.PGPF6hQ_2);
        TextUtils.writeToParcel(this.f1817KQgRr5e_0, parcel, i);
        parcel.writeTypedList(this.f1818KQgRr5e_0);
        parcel.writeLong(this.f3423X6FRs_4);
        parcel.writeBundle(this.f1816KQgRr5e_0);
        parcel.writeInt(this.QxJ9d_1);
    }

    /* loaded from: classes.dex */
    public static final class CustomAction implements Parcelable {
        public static final Parcelable.Creator<CustomAction> CREATOR = new KQgRr5e_0();
        public final int KQgRr5e_0;

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

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

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final String f1822KQgRr5e_0;

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

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

        public CustomAction(String str, CharSequence charSequence, int i, Bundle bundle) {
            this.f1822KQgRr5e_0 = str;
            this.f1821KQgRr5e_0 = charSequence;
            this.KQgRr5e_0 = i;
            this.f1820KQgRr5e_0 = bundle;
        }

        public static CustomAction KQgRr5e_0(Object obj) {
            if (obj == null || Build.VERSION.SDK_INT < 21) {
                return null;
            }
            return new CustomAction(X6FRs_4.KQgRr5e_0.m148KQgRr5e_0(obj), X6FRs_4.KQgRr5e_0.m147KQgRr5e_0(obj), X6FRs_4.KQgRr5e_0.KQgRr5e_0(obj), X6FRs_4.KQgRr5e_0.m146KQgRr5e_0(obj));
        }

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

        public String toString() {
            return "Action:mName='" + ((Object) this.f1821KQgRr5e_0) + ", mIcon=" + this.KQgRr5e_0 + ", mExtras=" + this.f1820KQgRr5e_0;
        }

        @Override // android.os.Parcelable
        public void writeToParcel(Parcel parcel, int i) {
            parcel.writeString(this.f1822KQgRr5e_0);
            TextUtils.writeToParcel(this.f1821KQgRr5e_0, parcel, i);
            parcel.writeInt(this.KQgRr5e_0);
            parcel.writeBundle(this.f1820KQgRr5e_0);
        }

        public CustomAction(Parcel parcel) {
            this.f1822KQgRr5e_0 = parcel.readString();
            this.f1821KQgRr5e_0 = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
            this.KQgRr5e_0 = parcel.readInt();
            this.f1820KQgRr5e_0 = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
        }
    }

    public PlaybackStateCompat(Parcel parcel) {
        this.f1814KQgRr5e_0 = parcel.readInt();
        this.f1815KQgRr5e_0 = parcel.readLong();
        this.KQgRr5e_0 = parcel.readFloat();
        this.f3422Mqv2r_3 = parcel.readLong();
        this.f1819QxJ9d_1 = parcel.readLong();
        this.PGPF6hQ_2 = parcel.readLong();
        this.f1817KQgRr5e_0 = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
        this.f1818KQgRr5e_0 = parcel.createTypedArrayList(CustomAction.CREATOR);
        this.f3423X6FRs_4 = parcel.readLong();
        this.f1816KQgRr5e_0 = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
        this.QxJ9d_1 = parcel.readInt();
    }
}
