package com.ss.android.ugc.aweme.shortvideo;

import X.C35526Zq;
import X.C41016ih;
import X.C50826yW;
import X.M12;
import android.os.Parcel;
import android.os.Parcelable;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.shortvideo.library.LibraryMaterialInfoSv;
import com.ss.android.ugc.aweme.shortvideo.ui.TimeSpeedModelExtension;
import java.util.ArrayList;

public final class LibraryContext implements Parcelable {
    public static final Parcelable.Creator<LibraryContext> CREATOR = new C50826yW();
    public int LIZ;
    public LibraryMaterialInfoSv LIZIZ;

    static {
        Covode.recordClassIndex(108145);
    }

    public LibraryContext(byte b) {
        this();
    }

    public final int describeContents() {
        return 0;
    }

    public final void writeToParcel(Parcel parcel, int i) {
        M12.LIZ(parcel);
        parcel.writeInt(this.LIZ);
        parcel.writeParcelable(this.LIZIZ, i);
    }

    public /* synthetic */ LibraryContext() {
        this(0, (LibraryMaterialInfoSv) null);
    }

    public final void LIZ(ArrayList<TimeSpeedModelExtension> arrayList) {
        M12.LIZ(arrayList);
        ArrayList arrayList2 = new ArrayList();
        for (T next : arrayList) {
            if (C41016ih.LIZ((TimeSpeedModelExtension) next)) {
                arrayList2.add(next);
            }
        }
        this.LIZ = arrayList2.size();
        C35526Zq.LIZ("ZHENGLI: initContext -> library count = " + this.LIZ);
    }

    public LibraryContext(int i, LibraryMaterialInfoSv libraryMaterialInfoSv) {
        this.LIZ = i;
        this.LIZIZ = libraryMaterialInfoSv;
    }
}
