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

import X.3F7;
import X.8gF;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.View;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;

public final class SingleTaskBulletContainerActivity extends BulletContainerActivity {
    public SparseArray LJIIL;

    static {
        Covode.recordClassIndex(54874);
    }

    public final View LIZ(int i) {
        if (this.LJIIL == null) {
            this.LJIIL = new SparseArray();
        }
        View view = (View) this.LJIIL.get(i);
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        this.LJIIL.put(i, findViewById);
        return findViewById;
    }

    public final int LJIJJLI() {
        return -1;
    }

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

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

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

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.bullet.BulletContainerActivity, com.ss.android.ugc.aweme.bullet.SingleTaskBulletContainerActivity, android.app.Activity] */
    public final void onStart() {
        8gF.LIZ(this);
        super.onStart();
    }

    public final void finish() {
        super.finish();
        if (3F7.LIZ()) {
            overridePendingTransition(2130772157, 2130772162);
        } else {
            overridePendingTransition(2130772155, 2130772164);
        }
    }

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

    /* JADX WARNING: type inference failed for: r0v2, types: [android.app.Activity] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void onWindowFocusChanged(boolean r4) {
        /*
            r3 = this;
            java.lang.String r2 = "com.ss.android.ugc.aweme.bullet.SingleTaskBulletContainerActivity"
            java.lang.String r1 = "onWindowFocusChanged"
            r0 = 1
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r2, r1, r0)
            super.onWindowFocusChanged(r4)
            if (r4 == 0) goto L_0x001a
            boolean r0 = r3.LJIIJJI
            if (r0 == 0) goto L_0x001a
            X.3ah r1 = X.3ah.LJ
            r0 = r3
            r1.LIZ(r0)
            r0 = 0
            r3.LJIIJJI = r0
        L_0x001a:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.bullet.SingleTaskBulletContainerActivity.onWindowFocusChanged(boolean):void");
    }

    /* JADX WARNING: type inference failed for: r5v0, types: [com.ss.android.ugc.aweme.bullet.BulletContainerActivity, com.ss.android.ugc.aweme.bullet.SingleTaskBulletContainerActivity, android.app.Activity] */
    public final void onCreate(Bundle bundle) {
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.bullet.SingleTaskBulletContainerActivity", "onCreate", true);
        boolean booleanExtra = getIntent().getBooleanExtra("is_clear_top", false);
        if ((!3F7.LIZ() || !booleanExtra) && (3F7.LIZ() || booleanExtra)) {
            overridePendingTransition(2130772155, 2130772164);
        } else {
            overridePendingTransition(2130772157, 2130772162);
        }
        super.onCreate(bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.bullet.SingleTaskBulletContainerActivity", "onCreate", false);
    }
}
