package com.ss.android.ugc.aweme.ecommerce.address.edit;

import X.2Pr;
import X.7he;
import X.8gF;
import X.C8K;
import X.C8L;
import X.C8U;
import X.CWJ;
import X.Crj;
import X.Ls2;
import X.Szo;
import android.os.Bundle;
import android.os.SystemClock;
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 com.ss.android.ugc.aweme.live.ILiveOuterService;
import com.ss.android.ugc.aweme.live.LiveOuterService;
import kotlin.h.b.n;

public final class AddressEditActivity extends CWJ {
    public final Crj LIZ = 7he.LIZ(new C8L(this));
    public long LIZIZ = -1;
    public SparseArray LIZJ;

    static {
        Covode.recordClassIndex(68054);
    }

    private final C8K LIZ() {
        return (C8K) this.LIZ.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;
    }

    public final void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity", "onWindowFocusChanged", true);
        AddressEditActivity.super.onWindowFocusChanged(z);
    }

    public final void onBackPressed() {
        LIZ().LIZ((Ls2<2Pr>) new C8U(this));
    }

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

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

    /* JADX WARNING: type inference failed for: r5v0, types: [com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity, X.SNU, android.app.Activity] */
    public final void onPause() {
        8gF.LIZJ(this);
        AddressEditActivity.super.onPause();
        ILiveOuterService LJJI = LiveOuterService.LJJI();
        n.LIZIZ(LJJI, "");
        LJJI.LJ().LIZIZ(SystemClock.elapsedRealtime() - this.LIZIZ);
    }

    /* JADX WARNING: type inference failed for: r4v0, types: [com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity, X.SNU, android.app.Activity] */
    public final void onResume() {
        8gF.LIZIZ(this);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity", "onResume", true);
        AddressEditActivity.super.onResume();
        this.LIZIZ = SystemClock.elapsedRealtime();
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity", "onResume", false);
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity, X.SNU, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        AddressEditActivity.super.onStop();
        LIZ().LIZIZ();
        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: r0v0, types: [android.app.Activity] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void onRestoreInstanceState(android.os.Bundle r3) {
        /*
            r2 = this;
            X.M12.LIZ(r3)
            com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity.super.onRestoreInstanceState(r3)
            X.C8K r1 = r2.LIZ()
            r0 = r2
            r1.LIZ(r0, r3)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity.onRestoreInstanceState(android.os.Bundle):void");
    }

    /* 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 onSaveInstanceState(android.os.Bundle r3) {
        /*
            r2 = this;
            X.M12.LIZ(r3)
            com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity.super.onSaveInstanceState(r3)
            X.C8K r1 = r2.LIZ()
            r0 = r2
            r1.LIZIZ(r0, r3)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity.onSaveInstanceState(android.os.Bundle):void");
    }

    /* JADX WARNING: type inference failed for: r4v0, types: [com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity, android.app.Activity, X.CWJ] */
    public final void onCreate(Bundle bundle) {
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity", "onCreate", true);
        super.onCreate(bundle);
        LIZ().LIZ(bundle);
        Szo LIZ2 = Szo.LIZIZ.LIZ(this);
        LIZ2.LIZ(2131099659);
        LIZ2.LIZ.LIZJ();
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.ecommerce.address.edit.AddressEditActivity", "onCreate", false);
    }
}
