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

import X.0AA;
import X.0AP;
import X.8gF;
import X.AnonymousClass367;
import X.C03012Pr;
import X.C16832uR;
import X.C217935v;
import X.C218035w;
import X.C218335z;
import X.C30953c7;
import X.C55344aM;
import X.FKq;
import X.Ls2;
import X.SNU;
import android.content.Intent;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.View;
import androidx.fragment.app.Fragment;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;
import kotlin.h.b.n;

public final class PushSettingNotificationChoiceActivity extends SNU {
    public static final C218335z LIZ = new C218335z((byte) 0);
    public SparseArray LIZIZ;

    static {
        Covode.recordClassIndex(106377);
    }

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

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

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

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

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

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

    /* JADX WARNING: type inference failed for: r4v0, types: [com.ss.android.ugc.aweme.setting.ui.PushSettingNotificationChoiceActivity, X.SNU, android.app.Activity] */
    public final void onResume() {
        8gF.LIZIZ(this);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.setting.ui.PushSettingNotificationChoiceActivity", "onResume", true);
        PushSettingNotificationChoiceActivity.super.onResume();
        if (!C55344aM.LIZ(this)) {
            finish();
            overridePendingTransition(0, 0);
        }
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.setting.ui.PushSettingNotificationChoiceActivity", "onResume", false);
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.setting.ui.PushSettingNotificationChoiceActivity, X.SNU, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        PushSettingNotificationChoiceActivity.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, com.ss.android.ugc.aweme.setting.ui.PushSettingNotificationChoiceActivity, X.4Qh, X.SNU, android.app.Activity] */
    public final void onCreate(Bundle bundle) {
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.setting.ui.PushSettingNotificationChoiceActivity", "onCreate", true);
        activityConfiguration(C217935v.LIZ);
        PushSettingNotificationChoiceActivity.super.onCreate(bundle);
        setContentView(2131561249);
        0AA supportFragmentManager = getSupportFragmentManager();
        Fragment LIZ2 = supportFragmentManager.LIZ("FRAGMENT_PUSH_MANAGER_LIST");
        if (LIZ2 == null) {
            LIZ2 = FKq.LIZ.LJIILL();
        }
        Bundle bundle2 = new Bundle();
        bundle2.putString("enter_from", LIZ(getIntent(), "enter_from"));
        LIZ2.setArguments(bundle2);
        0AP LIZ3 = supportFragmentManager.LIZ();
        n.LIZIZ(LIZ3, "");
        LIZ3.LIZIZ(2131365158, LIZ2, "FRAGMENT_PUSH_MANAGER_LIST");
        LIZ3.LIZJ();
        C16832uR r2 = new C16832uR();
        String string = getString(2131829852);
        n.LIZIZ(string, "");
        AnonymousClass367.LIZ(r2, string, (Ls2<C03012Pr>) new C218035w(this));
        ((C30953c7) _$_findCachedViewById(2131371289)).setNavActions(r2);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.setting.ui.PushSettingNotificationChoiceActivity", "onCreate", false);
    }

    public static String LIZ(Intent intent, String str) {
        try {
            return intent.getStringExtra(str);
        } catch (Exception unused) {
            return null;
        }
    }
}
