package android.support.v4.media.session;

import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import java.util.List;

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

    /* renamed from: p, reason: collision with root package name */
    final int f478p;

    /* renamed from: q, reason: collision with root package name */
    final long f479q;

    /* renamed from: r, reason: collision with root package name */
    final long f480r;

    /* renamed from: s, reason: collision with root package name */
    final float f481s;

    /* renamed from: t, reason: collision with root package name */
    final long f482t;

    /* renamed from: u, reason: collision with root package name */
    final int f483u;

    /* renamed from: v, reason: collision with root package name */
    final CharSequence f484v;

    /* renamed from: w, reason: collision with root package name */
    final long f485w;

    /* renamed from: x, reason: collision with root package name */
    List f486x;

    /* renamed from: y, reason: collision with root package name */
    final long f487y;

    /* renamed from: z, reason: collision with root package name */
    final Bundle f488z;

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

        /* renamed from: p, reason: collision with root package name */
        private final String f489p;

        /* renamed from: q, reason: collision with root package name */
        private final CharSequence f490q;

        /* renamed from: r, reason: collision with root package name */
        private final int f491r;

        /* renamed from: s, reason: collision with root package name */
        private final Bundle f492s;

        /* loaded from: classes.dex */
        static class a implements Parcelable.Creator {
            a() {
            }

            @Override // android.os.Parcelable.Creator
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public CustomAction createFromParcel(Parcel parcel) {
                return new CustomAction(parcel);
            }

            @Override // android.os.Parcelable.Creator
            /* renamed from: b, reason: merged with bridge method [inline-methods] */
            public CustomAction[] newArray(int i10) {
                return new CustomAction[i10];
            }
        }

        CustomAction(Parcel parcel) {
            this.f489p = parcel.readString();
            this.f490q = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
            this.f491r = parcel.readInt();
            this.f492s = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
        }

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

        public String toString() {
            return "Action:mName='" + ((Object) this.f490q) + ", mIcon=" + this.f491r + ", mExtras=" + this.f492s;
        }

        @Override // android.os.Parcelable
        public void writeToParcel(Parcel parcel, int i10) {
            parcel.writeString(this.f489p);
            TextUtils.writeToParcel(this.f490q, parcel, i10);
            parcel.writeInt(this.f491r);
            parcel.writeBundle(this.f492s);
        }
    }

    /* loaded from: classes.dex */
    static class a implements Parcelable.Creator {
        a() {
        }

        @Override // android.os.Parcelable.Creator
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public PlaybackStateCompat createFromParcel(Parcel parcel) {
            return new PlaybackStateCompat(parcel);
        }

        @Override // android.os.Parcelable.Creator
        /* renamed from: b, reason: merged with bridge method [inline-methods] */
        public PlaybackStateCompat[] newArray(int i10) {
            return new PlaybackStateCompat[i10];
        }
    }

    PlaybackStateCompat(Parcel parcel) {
        this.f478p = parcel.readInt();
        this.f479q = parcel.readLong();
        this.f481s = parcel.readFloat();
        this.f485w = parcel.readLong();
        this.f480r = parcel.readLong();
        this.f482t = parcel.readLong();
        this.f484v = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
        this.f486x = parcel.createTypedArrayList(CustomAction.CREATOR);
        this.f487y = parcel.readLong();
        this.f488z = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
        this.f483u = parcel.readInt();
    }

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

    public String toString() {
        return "PlaybackState {state=" + this.f478p + ", position=" + this.f479q + ", buffered position=" + this.f480r + ", speed=" + this.f481s + ", updated=" + this.f485w + ", actions=" + this.f482t + ", error code=" + this.f483u + ", error message=" + this.f484v + ", custom actions=" + this.f486x + ", active item id=" + this.f487y + "}";
    }

    @Override // android.os.Parcelable
    public void writeToParcel(Parcel parcel, int i10) {
        parcel.writeInt(this.f478p);
        parcel.writeLong(this.f479q);
        parcel.writeFloat(this.f481s);
        parcel.writeLong(this.f485w);
        parcel.writeLong(this.f480r);
        parcel.writeLong(this.f482t);
        TextUtils.writeToParcel(this.f484v, parcel, i10);
        parcel.writeTypedList(this.f486x);
        parcel.writeLong(this.f487y);
        parcel.writeBundle(this.f488z);
        parcel.writeInt(this.f483u);
    }
}
