package com.ss.android.ugc.aweme.donation.webpage;

import X.8gF;
import X.C0383K1u;
import X.C0384K1v;
import X.C2041KmO;
import X.C2285KqK;
import X.C2289KqO;
import X.K2K;
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.sysoptimizer.EnterTransitionCrashOptimizer;
import kotlin.h.b.n;

public final class DonationWebPageActivity extends SNU {
    public C2041KmO LIZ;
    public C2285KqK LIZIZ;
    public SparseArray LIZJ;

    static {
        Covode.recordClassIndex(66380);
    }

    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.donation.webpage.DonationWebPageActivity, android.app.Activity] */
    public final void onDestroy() {
        8gF.LJ(this);
        DonationWebPageActivity.super.onDestroy();
    }

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

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

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

    public final void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.donation.webpage.DonationWebPageActivity", "onWindowFocusChanged", true);
        DonationWebPageActivity.super.onWindowFocusChanged(z);
    }

    public final void onBackPressed() {
        C2285KqK kqK = this.LIZIZ;
        if (kqK == null) {
            n.LIZ("");
        }
        C2289KqO LJFF = kqK.LJFF();
        if (LJFF == null || !LJFF.LIZ()) {
            DonationWebPageActivity.super.onBackPressed();
        }
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [X.SNU, com.ss.android.ugc.aweme.donation.webpage.DonationWebPageActivity, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        DonationWebPageActivity.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: [X.SNU, com.ss.android.ugc.aweme.donation.webpage.DonationWebPageActivity, android.app.Activity] */
    public final void onCreate(Bundle bundle) {
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.donation.webpage.DonationWebPageActivity", "onCreate", true);
        DonationWebPageActivity.super.onCreate(bundle);
        setContentView(2131559585);
        C2041KmO LIZ2 = K2K.LIZ(getIntent());
        n.LIZIZ(LIZ2, "");
        this.LIZ = LIZ2;
        C2041KmO kmO = this.LIZ;
        if (kmO == null) {
            n.LIZ("");
        }
        C2285KqK kqK = new C2285KqK(this, kmO, (byte) 0);
        this.LIZIZ = kqK;
        kqK.LIZ();
        C2285KqK kqK2 = this.LIZIZ;
        if (kqK2 == null) {
            n.LIZ("");
        }
        kqK2.LJ = new C0383K1u(this);
        C2285KqK kqK3 = this.LIZIZ;
        if (kqK3 == null) {
            n.LIZ("");
        }
        kqK3.LIZLLL = new C0384K1v(this);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.donation.webpage.DonationWebPageActivity", "onCreate", false);
    }
}
