package com.ss.android.ugc.aweme.account.login.authorize;

import X.0Gf;
import X.0Gp;
import X.2UX;
import X.2nK;
import X.2uR;
import X.367;
import X.3CG;
import X.7he;
import X.8gF;
import X.Crj;
import X.FY7;
import X.FY9;
import X.FgZ;
import X.FhB;
import X.FhL;
import X.M12;
import X.OQg;
import X.OQh;
import X.S5L;
import X.SNU;
import android.os.Bundle;
import android.view.View;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;
import com.ss.android.ugc.aweme.account.login.twostep.TwoStepAuthApi;
import java.util.HashMap;
import kotlin.h.b.n;

public final class AuthorizedDeviceActivity extends SNU {
    public final Crj LIZ = 7he.LIZ(new FgZ(this));
    public final Crj LIZIZ = 7he.LIZ(new FhB(this));
    public HashMap LIZJ;

    static {
        Covode.recordClassIndex(51023);
    }

    public final String LIZ() {
        return (String) this.LIZ.getValue();
    }

    public final 3CG LIZIZ() {
        return (3CG) this.LIZIZ.getValue();
    }

    public final void _$_clearFindViewByIdCache() {
        HashMap hashMap = this.LIZJ;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

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

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

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

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

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

    public final void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.account.login.authorize.AuthorizedDeviceActivity", "onWindowFocusChanged", true);
        AuthorizedDeviceActivity.super.onWindowFocusChanged(z);
    }

    public final void LIZJ() {
        OQg _$_findCachedViewById = _$_findCachedViewById(2131370607);
        n.LIZIZ(_$_findCachedViewById, "");
        _$_findCachedViewById.setVisibility(0);
        _$_findCachedViewById(2131370607).setOnClickListener((View.OnClickListener) null);
        _$_findCachedViewById(2131370607).LIZ();
        TwoStepAuthApi.LIZIZ.LIZIZ().LIZ(new FY7(this), 0Gp.LIZIZ, (0Gf) null);
    }

    public final void LIZLLL() {
        OQh oQh = new OQh();
        String string = getString(2131832987);
        n.LIZIZ(string, "");
        oQh.LIZ(string);
        _$_findCachedViewById(2131370607).setStatus(oQh);
        OQg _$_findCachedViewById = _$_findCachedViewById(2131370607);
        n.LIZIZ(_$_findCachedViewById, "");
        _$_findCachedViewById.setVisibility(0);
        _$_findCachedViewById(2131370607).setOnClickListener(new FY9(this));
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.account.login.authorize.AuthorizedDeviceActivity, X.SNU, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        AuthorizedDeviceActivity.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: r7v0, types: [com.ss.android.ugc.aweme.account.login.authorize.AuthorizedDeviceActivity, X.4Qh, X.SNU, android.app.Activity] */
    public final void onCreate(Bundle bundle) {
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.account.login.authorize.AuthorizedDeviceActivity", "onCreate", true);
        activityConfiguration(FhL.LIZ);
        AuthorizedDeviceActivity.super.onCreate(bundle);
        setContentView(2131558682);
        2uR r3 = new 2uR();
        String string = getString(2131832980);
        n.LIZIZ(string, "");
        367.LIZ(r3, string, this);
        _$_findCachedViewById(2131371262).setNavActions(r3);
        LIZJ();
        S5L s5l = S5L.LIZ;
        String LIZ2 = LIZ();
        n.LIZIZ(LIZ2, "");
        M12.LIZ(LIZ2);
        2UX LIZ3 = s5l.LIZ();
        LIZ3.LIZ("enter_from", LIZ2);
        2nK.LIZ("authorized_logins_notify", LIZ3.LIZ);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.account.login.authorize.AuthorizedDeviceActivity", "onCreate", false);
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [android.app.Activity] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZ(java.lang.Integer r3, java.lang.String r4) {
        /*
            r2 = this;
            X.3af r1 = new X.3af
            r0 = r2
            r1.<init>(r0)
            if (r3 != 0) goto L_0x0016
            r0 = 2131824773(0x7f111085, float:1.9282383E38)
            java.lang.String r0 = r2.getString(r0)
            r1.LIZ(r0)
        L_0x0012:
            X.3af.LIZ(r1)
            return
        L_0x0016:
            int r0 = r3.intValue()
            if (r0 < 0) goto L_0x0022
            boolean r0 = android.text.TextUtils.isEmpty(r4)
            if (r0 == 0) goto L_0x002d
        L_0x0022:
            r0 = 2131827476(0x7f111b14, float:1.9287866E38)
            java.lang.String r0 = r2.getString(r0)
            r1.LIZ(r0)
            goto L_0x0012
        L_0x002d:
            if (r4 != 0) goto L_0x0032
            kotlin.h.b.n.LIZIZ()
        L_0x0032:
            r1.LIZ(r4)
            goto L_0x0012
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.account.login.authorize.AuthorizedDeviceActivity.LIZ(java.lang.Integer, java.lang.String):void");
    }
}
