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

import X.0AA;
import X.46i;
import X.8gF;
import X.C0295Crj;
import X.C6249FOj;
import X.C6250FOk;
import X.C6252FOm;
import X.FOA;
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 com.ss.android.ugc.aweme.profile.model.User;
import kotlin.h.b.n;

public final class ProfileEditBioUrlActivity extends SNU {
    public static final C6252FOm LIZ = new C6252FOm((byte) 0);
    public final C0295Crj LIZIZ = RouteArgExtension.INSTANCE.optionalArg(this, C6250FOk.LIZ, "bio_url", String.class);
    public SparseArray LIZJ;

    static {
        Covode.recordClassIndex(99059);
    }

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

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

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

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

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

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

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

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

    public final void finish() {
        ProfileEditBioUrlActivity.super.finish();
        overridePendingTransition(0, 0);
    }

    public final void onBackPressed() {
        ProfileEditBioUrlActivity.super.onBackPressed();
        finish();
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [X.SNU, com.ss.android.ugc.aweme.profile.ui.ProfileEditBioUrlActivity, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        ProfileEditBioUrlActivity.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: r8v0, types: [X.1hK, X.SNU, com.ss.android.ugc.aweme.profile.ui.ProfileEditBioUrlActivity, android.app.Activity] */
    public final void onCreate(Bundle bundle) {
        boolean z;
        String LIZ2;
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.profile.ui.ProfileEditBioUrlActivity", "onCreate", true);
        activityConfiguration(C6249FOj.LIZ);
        ProfileEditBioUrlActivity.super.onCreate(bundle);
        setContentView(2131558942);
        String LIZ3 = LIZ();
        if (LIZ3 == null || LIZ3.length() == 0) {
            z = true;
        } else {
            z = false;
        }
        if (z) {
            IAccountUserService LJFF = 46i.LJFF();
            n.LIZIZ(LJFF, "");
            User curUser = LJFF.getCurUser();
            n.LIZIZ(curUser, "");
            LIZ2 = curUser.getBioUrl();
        } else {
            LIZ2 = LIZ();
        }
        FOA foa = ProfileEditBioUrlFragment.LJIILL;
        if (LIZ2 == null) {
            LIZ2 = "";
        }
        ProfileEditBioUrlFragment LIZ4 = foa.LIZ(LIZ2, "");
        LIZ4.setUserVisibleHint(true);
        0AA supportFragmentManager = getSupportFragmentManager();
        n.LIZIZ(supportFragmentManager, "");
        LIZ4.show(supportFragmentManager, "EditBioUrl");
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.profile.ui.ProfileEditBioUrlActivity", "onCreate", false);
    }
}
