package android.support.v4.media.session;

import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;
import java.util.List;

public final class PlaybackStateCompat implements Parcelable {
    public static final Parcelable.Creator<PlaybackStateCompat> CREATOR = new Parcelable.Creator<PlaybackStateCompat>() {
        static {
            Covode.recordClassIndex(174);
        }

        public final /* bridge */ /* synthetic */ Object[] newArray(int i) {
            return new PlaybackStateCompat[i];
        }

        public final /* synthetic */ Object createFromParcel(Parcel parcel) {
            return new PlaybackStateCompat(parcel);
        }
    };
    public final int LIZ;
    public final long LIZIZ;
    public final long LIZJ;
    public final float LIZLLL;
    public final long LJ;
    public final int LJFF;
    public final CharSequence LJI;
    public final long LJII;
    public List<CustomAction> LJIIIIZZ;
    public final long LJIIIZ;
    public final Bundle LJIIJ;
    public Object LJIIJJI;

    public final int describeContents() {
        return 0;
    }

    public static final class CustomAction implements Parcelable {
        public static final Parcelable.Creator<CustomAction> CREATOR = new Parcelable.Creator<CustomAction>() {
            static {
                Covode.recordClassIndex(176);
            }

            public final /* bridge */ /* synthetic */ Object[] newArray(int i) {
                return new CustomAction[i];
            }

            public final /* synthetic */ Object createFromParcel(Parcel parcel) {
                return new CustomAction(parcel);
            }
        };
        public final String LIZ;
        public final CharSequence LIZIZ;
        public final int LIZJ;
        public final Bundle LIZLLL;
        public Object LJ;

        public final int describeContents() {
            return 0;
        }

        static {
            Covode.recordClassIndex(175);
        }

        public final String toString() {
            return "Action:mName='" + this.LIZIZ + ", mIcon=" + this.LIZJ + ", mExtras=" + this.LIZLLL;
        }

        public CustomAction(Parcel parcel) {
            this.LIZ = parcel.readString();
            this.LIZIZ = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
            this.LIZJ = parcel.readInt();
            this.LIZLLL = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
        }

        public final void writeToParcel(Parcel parcel, int i) {
            parcel.writeString(this.LIZ);
            TextUtils.writeToParcel(this.LIZIZ, parcel, i);
            parcel.writeInt(this.LIZJ);
            parcel.writeBundle(this.LIZLLL);
        }

        public CustomAction(String str, CharSequence charSequence, int i, Bundle bundle) {
            this.LIZ = str;
            this.LIZIZ = charSequence;
            this.LIZJ = i;
            this.LIZLLL = bundle;
        }
    }

    static {
        Covode.recordClassIndex(173);
    }

    public final String toString() {
        return "PlaybackState {" + "state=" + this.LIZ + ", position=" + this.LIZIZ + ", buffered position=" + this.LIZJ + ", speed=" + this.LIZLLL + ", updated=" + this.LJII + ", actions=" + this.LJ + ", error code=" + this.LJFF + ", error message=" + this.LJI + ", custom actions=" + this.LJIIIIZZ + ", active item id=" + this.LJIIIZ + "}";
    }

    public PlaybackStateCompat(Parcel parcel) {
        this.LIZ = parcel.readInt();
        this.LIZIZ = parcel.readLong();
        this.LIZLLL = parcel.readFloat();
        this.LJII = parcel.readLong();
        this.LIZJ = parcel.readLong();
        this.LJ = parcel.readLong();
        this.LJI = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
        this.LJIIIIZZ = parcel.createTypedArrayList(CustomAction.CREATOR);
        this.LJIIIZ = parcel.readLong();
        this.LJIIJ = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
        this.LJFF = parcel.readInt();
    }

    public final void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(this.LIZ);
        parcel.writeLong(this.LIZIZ);
        parcel.writeFloat(this.LIZLLL);
        parcel.writeLong(this.LJII);
        parcel.writeLong(this.LIZJ);
        parcel.writeLong(this.LJ);
        TextUtils.writeToParcel(this.LJI, parcel, i);
        parcel.writeTypedList(this.LJIIIIZZ);
        parcel.writeLong(this.LJIIIZ);
        parcel.writeBundle(this.LJIIJ);
        parcel.writeInt(this.LJFF);
    }

    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.LIZ = i;
        this.LIZIZ = j;
        this.LIZJ = j2;
        this.LIZLLL = f;
        this.LJ = j3;
        this.LJFF = i2;
        this.LJI = charSequence;
        this.LJII = j4;
        this.LJIIIIZZ = new ArrayList(list);
        this.LJIIIZ = j5;
        this.LJIIJ = bundle;
    }
}
