package com.ss.android.ugc.aweme.commercialize.im;

import X.2sG;
import X.46i;
import X.8gF;
import X.C0295Crj;
import X.C1242DRu;
import X.C6220FNg;
import X.C6221FNh;
import X.C6222FNi;
import X.C6223FNj;
import X.C6224FNk;
import X.C6225FNl;
import X.Ls2;
import X.Lw4;
import X.SNU;
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.router.arg.RouteArgExtension;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;
import com.ss.android.ugc.aweme.IAccountUserService;
import kotlin.h.b.n;

public final class ChatCheckLoginActivity extends SNU {
    public static final C6220FNg LIZLLL = new C6220FNg((byte) 0);
    public final C0295Crj LIZ = RouteArgExtension.INSTANCE.optionalArg(this, C6224FNk.LIZ, "extra_uid", String.class);
    public final C0295Crj LIZIZ = RouteArgExtension.INSTANCE.optionalArg(this, C6223FNj.LIZ, "extra_ext", String.class);
    public final C0295Crj LIZJ = RouteArgExtension.INSTANCE.optionalArg(this, C6225FNl.LIZ, "extra_imadlog", C1242DRu.class);
    public SparseArray LJ;

    static {
        Covode.recordClassIndex(58976);
    }

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

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

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

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

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

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

    public final void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.commercialize.im.ChatCheckLoginActivity", "onWindowFocusChanged", true);
        ChatCheckLoginActivity.super.onWindowFocusChanged(z);
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.commercialize.im.ChatCheckLoginActivity, X.SNU, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        ChatCheckLoginActivity.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: r6v0, types: [com.ss.android.ugc.aweme.commercialize.im.ChatCheckLoginActivity, X.SNU, android.app.Activity] */
    public final void onCreate(Bundle bundle) {
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.commercialize.im.ChatCheckLoginActivity", "onCreate", true);
        ChatCheckLoginActivity.super.onCreate(bundle);
        2sG r3 = new 2sG();
        r3.element = new C6221FNh(this);
        IAccountUserService LJFF = 46i.LJFF();
        n.LIZIZ(LJFF, "");
        if (LJFF.isLogin()) {
            ((Ls2) r3.element).invoke();
        } else {
            Lw4.LIZ(this, "", "", new C6222FNi(this, r3));
        }
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.commercialize.im.ChatCheckLoginActivity", "onCreate", false);
    }
}
