package com.ss.android.ugc.effectmanager.effect.model;

import X.M12;
import android.os.Parcel;
import android.os.Parcelable;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.effectmanager.common.logger.EPLog;
import com.ss.ugc.effectplatform.model.Effect;

public final class Effect$Companion$CREATOR$1 implements Parcelable.Creator<Effect> {
    static {
        Covode.recordClassIndex(125384);
    }

    public final Effect[] newArray(int i) {
        return new Effect[i];
    }

    public final Effect createFromParcel(Parcel parcel) {
        Object obj;
        M12.LIZ(parcel);
        Effect effect = null;
        try {
            Object obj2 = Effect.class.getField("CREATOR").get((Object) null);
            if (!(obj2 instanceof Parcelable.Creator)) {
                obj2 = null;
            }
            Parcelable.Creator creator = (Parcelable.Creator) obj2;
            if (creator != null) {
                obj = creator.createFromParcel(parcel);
            } else {
                obj = null;
            }
            if (!(obj instanceof Effect)) {
                obj = null;
            }
            effect = (Effect) obj;
        } catch (Exception e) {
            EPLog.e("createFromParcel", "get creator failed!", e);
        }
        return new Effect(effect);
    }
}
