package com.ss.android.ugc.aweme.profile.ui;

import X.070;
import X.8gF;
import X.QEL;
import android.net.Uri;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.View;
import android.widget.FrameLayout;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;

public final class I18nHeaderDetailActivity extends HeaderDetailActivity {
    public boolean LJIIZILJ;
    public SparseArray LJIJ;

    static {
        Covode.recordClassIndex(99031);
    }

    public final boolean LIZJ() {
        return true;
    }

    public final void _$_clearFindViewByIdCache() {
        SparseArray sparseArray = this.LJIJ;
        if (sparseArray != null) {
            sparseArray.clear();
        }
    }

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

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.profile.ui.HeaderDetailActivity, com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity, 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.profile.ui.HeaderDetailActivity, com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity, 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.profile.ui.HeaderDetailActivity, com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity, android.app.Activity] */
    public final void onResume() {
        8gF.LIZIZ(this);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity", "onResume", true);
        super.onResume();
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity", "onResume", false);
    }

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

    public final void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity", "onWindowFocusChanged", true);
        super.onWindowFocusChanged(z);
    }

    public final void LIZLLL() {
        super.LIZLLL();
        this.LJIIZILJ = getIntent().getBooleanExtra("handle_with_video_avatar", false);
    }

    /* JADX WARNING: type inference failed for: r0v1, types: [android.content.Context] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZIZ() {
        /*
            r3 = this;
            boolean r0 = r3.LJIIZILJ
            if (r0 == 0) goto L_0x002a
            X.SO6 r2 = new X.SO6
            r0 = r3
            r2.<init>(r0)
            android.content.res.Resources r1 = r3.getResources()
            r0 = 2130903080(0x7f030028, float:1.7412968E38)
            java.lang.String[] r1 = r1.getStringArray(r0)
            X.OPT r0 = new X.OPT
            r0.<init>(r3)
            r2.LIZ(r1, r0)
            X.SO7 r1 = r2.LIZIZ()
            r1.show()
            X.2fU r0 = X.2fU.LIZ
            r0.LIZ(r1)
            return
        L_0x002a:
            super.LJ()
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity.LIZIZ():void");
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.profile.ui.HeaderDetailActivity, com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity, 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: r5v0, types: [com.ss.android.ugc.aweme.profile.ui.HeaderDetailActivity, X.1oX, com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity, android.app.Activity] */
    public final void onCreate(Bundle bundle) {
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity", "onCreate", true);
        super.onCreate(bundle);
        FrameLayout frameLayout = (FrameLayout) findViewById(2131364964);
        if (frameLayout != null) {
            frameLayout.setBackgroundColor(070.LIZJ(this, 2131099678));
        }
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.profile.ui.I18nHeaderDetailActivity", "onCreate", false);
    }

    public final void LIZIZ(String str) {
        try {
            Uri parse = Uri.parse("file://".concat(String.valueOf(str)));
            if (parse != null) {
                QEL.LIZIZ().LJIIIIZZ().LIZ(parse);
                LIZ(this.LIZJ, false, parse.toString());
            }
        } catch (Exception unused) {
        }
    }
}
