package com.ss.android.ugc.aweme.hybridkit.spark;

import X.1hK;
import X.8gF;
import X.JW2;
import X.Kh8;
import X.Szo;
import android.os.Bundle;
import android.os.Parcelable;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.hybrid.spark.SparkContext;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;

public final class TranslucentActivity extends 1hK {
    static {
        Covode.recordClassIndex(83359);
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [X.1hK, com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity, android.app.Activity] */
    public final void onCreate(Bundle bundle) {
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity", "onCreate", true);
        TranslucentActivity.super.onCreate(bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity", "onCreate", false);
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [X.1hK, com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity, android.app.Activity] */
    public final void onDestroy() {
        8gF.LJ(this);
        TranslucentActivity.super.onDestroy();
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [X.1hK, com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity, android.app.Activity] */
    public final void onPause() {
        8gF.LIZJ(this);
        TranslucentActivity.super.onPause();
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [X.1hK, com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity, android.app.Activity] */
    public final void onResume() {
        8gF.LIZIZ(this);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity", "onResume", true);
        TranslucentActivity.super.onResume();
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity", "onResume", false);
    }

    public final void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity", "onWindowFocusChanged", true);
        TranslucentActivity.super.onWindowFocusChanged(z);
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [X.1hK, com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity, android.app.Activity] */
    public final void onStart() {
        8gF.LIZ(this);
        TranslucentActivity.super.onStart();
        Szo LIZ = Szo.LIZIZ.LIZ(this);
        LIZ.LIZ();
        LIZ.LIZ.LIZJ();
        Parcelable parcelableExtra = getIntent().getParcelableExtra("sparkContext");
        if (!(parcelableExtra instanceof SparkContext)) {
            parcelableExtra = null;
        }
        SparkContext sparkContext = (SparkContext) parcelableExtra;
        if (sparkContext != null) {
            sparkContext.LIZ(new JW2(this));
            Kh8.LJIIJJI.LIZ(this, sparkContext);
        }
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [X.1hK, com.ss.android.ugc.aweme.hybridkit.spark.TranslucentActivity, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        TranslucentActivity.super.onStop();
        if (EnterTransitionCrashOptimizer.getContext() != null) {
            try {
                getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
            } catch (Throwable unused) {
            }
        }
        try {
            getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
        } catch (Throwable unused2) {
        }
    }
}
