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

import X.0CB;
import X.0CH;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.shortvideo.SafeHandler;

public class ToolSafeHandler extends SafeHandler {
    public boolean LIZIZ;

    static {
        Covode.recordClassIndex(113520);
    }

    /* renamed from: com.ss.android.ugc.aweme.shortvideo.util.ToolSafeHandler$1  reason: invalid class name */
    public static /* synthetic */ class AnonymousClass1 {
        public static final /* synthetic */ int[] LIZ;

        static {
            Covode.recordClassIndex(113521);
            int[] iArr = new int[0CB.values().length];
            LIZ = iArr;
            try {
                iArr[0CB.ON_DESTROY.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
        }
    }

    public ToolSafeHandler(0CH r1) {
        super(r1);
    }

    public final void LIZ(Runnable runnable) {
        if (!this.LIZIZ) {
            post(runnable);
        }
    }

    public void onStateChanged(0CH r3, 0CB r4) {
        if (AnonymousClass1.LIZ[r4.ordinal()] == 1) {
            LIZ();
            this.LIZIZ = true;
        }
    }
}
