导航菜单

页面标题

页面副标题

Cashalo v2.25.0.0 - AuthenticationEntryActivity.java 源代码

正在查看: Cashalo v2.25.0.0 应用的 AuthenticationEntryActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package finance.empower.android.app.authentication;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.ComponentActivity;
import androidx.activity.compose.ComponentActivityKt;
import androidx.activity.result.ActivityResultLauncher;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.CompositionContext;
import androidx.compose.runtime.CompositionScopedCoroutineScopeCanceller;
import androidx.compose.runtime.EffectsKt;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.SnapshotMutationPolicy;
import androidx.compose.runtime.SnapshotStateKt;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.snap.stuffing.api.DynamicAppManager;
import finance.empower.android.LogicFailure;
import finance.empower.android.app.BaseComponentActivity;
import finance.empower.android.app.authentication.AuthenticationEntryPresenter;
import finance.empower.android.app.components.AnalyticsComponent;
import finance.empower.android.app.components.SnackbarComponent;
import finance.empower.android.app.password.ResetPasswordActivity;
import finance.empower.android.kotlin.extensions.content.Internals;
import finance.empower.android.view.EmpowerScaffoldKt;
import finance.empower.android.view.EmpowerScaffoldState;
import finance.empower.android.view.Presenter;
import javax.inject.Inject;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.coroutines.EmptyCoroutineContext;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CoroutineScope;

@Metadata(d1 = {"\u0000`\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0007\u0018\u0000 /2\u00020\u00012\u00020\u0002:\u0001/B\u0005¢\u0006\u0002\u0010\u0003J \u0010\"\u001a\u00020#2\u0006\u0010$\u001a\u00020\f2\u0006\u0010%\u001a\u00020\f2\u0006\u0010&\u001a\u00020'H\u0016J\b\u0010(\u001a\u00020#H\u0016J\u0012\u0010)\u001a\u00020#2\b\u0010*\u001a\u0004\u0018\u00010+H\u0014J\b\u0010,\u001a\u00020#H\u0014J\b\u0010-\u001a\u00020#H\u0014J\u0016\u0010.\u001a\u00020#2\f\u0010\u001e\u001a\b\u0012\u0004\u0012\u00020!0 H\u0016R$\u0010\u0006\u001a\u00020\u00052\u0006\u0010\u0004\u001a\u00020\u0005@GX\u0086.¢\u0006\u000e\n\u0000\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\nR\u0014\u0010\u000b\u001a\u00020\fX\u0094D¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000eR$\u0010\u0010\u001a\u00020\u000f2\u0006\u0010\u0004\u001a\u00020\u000f@GX\u0086.¢\u0006\u000e\n\u0000\u001a\u0004\b\u0011\u0010\u0012\"\u0004\b\u0013\u0010\u0014R$\u0010\u0016\u001a\u00020\u00152\u0006\u0010\u0004\u001a\u00020\u0015@GX\u0086.¢\u0006\u000e\n\u0000\u001a\u0004\b\u0017\u0010\u0018\"\u0004\b\u0019\u0010\u001aR\u0014\u0010\u001b\u001a\b\u0012\u0004\u0012\u00020\u001d0\u001cX\u0082.¢\u0006\u0002\n\u0000R\u001a\u0010\u001e\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020!0 0\u001fX\u0082\u0004¢\u0006\u0002\n\u0000¨\u00060"}, d2 = {"Lfinance/empower/android/app/authentication/AuthenticationEntryActivity;", "Lfinance/empower/android/app/BaseComponentActivity;", "Lfinance/empower/android/app/authentication/AuthenticationEntryPresenter$ViewContract;", "()V", "<set-?>", "Lcom/snap/stuffing/api/DynamicAppManager;", "dynamicAppManager", "getDynamicAppManager", "()Lcom/snap/stuffing/api/DynamicAppManager;", "setDynamicAppManager", "(Lcom/snap/stuffing/api/DynamicAppManager;)V", "pageName", "", "getPageName", "()Ljava/lang/String;", "Lfinance/empower/android/app/authentication/AuthenticationEntryPresenter;", "presenter", "getPresenter", "()Lfinance/empower/android/app/authentication/AuthenticationEntryPresenter;", "setPresenter", "(Lfinance/empower/android/app/authentication/AuthenticationEntryPresenter;)V", "Lfinance/empower/android/app/components/SnackbarComponent;", "snackbarComponent", "getSnackbarComponent", "()Lfinance/empower/android/app/components/SnackbarComponent;", "setSnackbarComponent", "(Lfinance/empower/android/app/components/SnackbarComponent;)V", "snackbarResultLauncher", "Landroidx/activity/result/ActivityResultLauncher;", "Landroid/content/Intent;", "viewState", "Landroidx/compose/runtime/MutableState;", "Lfinance/empower/android/view/Presenter$LoadingViewState;", "Lfinance/empower/android/app/authentication/AuthenticationEntryPresenter$ViewContract$Content;", "navigateToConfirmationCode", "", "phoneNumber", "accessChallenge", "isRegistration", "", "navigateToResetPassword", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "onStart", "onStop", "render", "Companion", "empower-app_release"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class AuthenticationEntryActivity extends BaseComponentActivity implements AuthenticationEntryPresenter.ViewContract {
    private static final String EXTRA_MOBILE_NUMBER = "finance.empower.3e585f13-6d5f-4353-8d4b-c6abdb1cd337";
    public DynamicAppManager dynamicAppManager;
    public AuthenticationEntryPresenter presenter;
    public SnackbarComponent snackbarComponent;
    private ActivityResultLauncher<Intent> snackbarResultLauncher;

    public static final Companion INSTANCE = new Companion(null);
    public static final int $stable = 8;
    private final MutableState<Presenter.LoadingViewState<AuthenticationEntryPresenter.ViewContract.Content>> viewState = SnapshotStateKt.mutableStateOf$default(new Presenter.LoadingViewState.Loading.NonBlocking(null, 1, null), (SnapshotMutationPolicy) null, 2, (Object) null);
    private final String pageName = "AuthenticationEntryScreen";

    @Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u001a\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\b2\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\u0004R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lfinance/empower/android/app/authentication/AuthenticationEntryActivity$Companion;", "", "()V", "EXTRA_MOBILE_NUMBER", "", "newIntent", "Landroid/content/Intent;", "context", "Landroid/content/Context;", "mobileNumber", "empower-app_release"}, k = 1, mv = {1, 9, 0}, xi = 48)
    public static final class Companion {
        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private Companion() {
        }

        public static Intent newIntent$default(Companion companion, Context context, String str, int i, Object obj) {
            if ((i & 2) != 0) {
                str = null;
            }
            return companion.newIntent(context, str);
        }

        public final Intent newIntent(Context context, String mobileNumber) {
            Intrinsics.checkNotNullParameter(context, "context");
            Intent createIntent = Internals.createIntent(context, AuthenticationEntryActivity.class, new Pair[0]);
            if (mobileNumber != null) {
                createIntent.putExtra(AuthenticationEntryActivity.EXTRA_MOBILE_NUMBER, mobileNumber);
            }
            return createIntent;
        }
    }

    public final AuthenticationEntryPresenter getPresenter() {
        AuthenticationEntryPresenter authenticationEntryPresenter = this.presenter;
        if (authenticationEntryPresenter != null) {
            return authenticationEntryPresenter;
        }
        Intrinsics.throwUninitializedPropertyAccessException("presenter");
        return null;
    }

    @Inject
    public final void setPresenter(AuthenticationEntryPresenter authenticationEntryPresenter) {
        Intrinsics.checkNotNullParameter(authenticationEntryPresenter, "<set-?>");
        this.presenter = authenticationEntryPresenter;
    }

    public final SnackbarComponent getSnackbarComponent() {
        SnackbarComponent snackbarComponent = this.snackbarComponent;
        if (snackbarComponent != null) {
            return snackbarComponent;
        }
        Intrinsics.throwUninitializedPropertyAccessException("snackbarComponent");
        return null;
    }

    @Inject
    public final void setSnackbarComponent(SnackbarComponent snackbarComponent) {
        Intrinsics.checkNotNullParameter(snackbarComponent, "<set-?>");
        this.snackbarComponent = snackbarComponent;
    }

    public final DynamicAppManager getDynamicAppManager() {
        DynamicAppManager dynamicAppManager = this.dynamicAppManager;
        if (dynamicAppManager != null) {
            return dynamicAppManager;
        }
        Intrinsics.throwUninitializedPropertyAccessException("dynamicAppManager");
        return null;
    }

    @Inject
    public final void setDynamicAppManager(DynamicAppManager dynamicAppManager) {
        Intrinsics.checkNotNullParameter(dynamicAppManager, "<set-?>");
        this.dynamicAppManager = dynamicAppManager;
    }

    @Override
    protected String getPageName() {
        return this.pageName;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ComponentActivity componentActivity = (ComponentActivity) this;
        this.snackbarResultLauncher = getSnackbarComponent().registerSnackbarResultLauncher(componentActivity);
        ComponentActivityKt.setContent$default(componentActivity, (CompositionContext) null, ComposableLambdaKt.composableLambdaInstance(2137242493, true, new Function2<Composer, Integer, Unit>() {
            {
                super(2);
            }

            public Object invoke(Object obj, Object obj2) {
                invoke((Composer) obj, ((Number) obj2).intValue());
                return Unit.INSTANCE;
            }

            public final void invoke(Composer composer, int i) {
                if ((i & 11) == 2 && composer.getSkipping()) {
                    composer.skipToGroupEnd();
                    return;
                }
                if (ComposerKt.isTraceInProgress()) {
                    ComposerKt.traceEventStart(2137242493, i, -1, "finance.empower.android.app.authentication.AuthenticationEntryActivity.onCreate.<anonymous> (AuthenticationEntryActivity.kt:103)");
                }
                AuthenticationEntryActivity authenticationEntryActivity = AuthenticationEntryActivity.this;
                ComposerKt.sourceInformationMarkerStart(composer, -492369756, "CC(remember):Composables.kt#9igjgp");
                Object rememberedValue = composer.rememberedValue();
                if (rememberedValue == Composer.Companion.getEmpty()) {
                    rememberedValue = authenticationEntryActivity.viewState;
                    composer.updateRememberedValue(rememberedValue);
                }
                ComposerKt.sourceInformationMarkerEnd(composer);
                MutableState mutableState = (MutableState) rememberedValue;
                EmpowerScaffoldState rememberEmpowerScaffoldState = EmpowerScaffoldKt.rememberEmpowerScaffoldState(null, null, composer, 0, 3);
                ComposerKt.sourceInformationMarkerStart(composer, 773894976, "CC(rememberCoroutineScope)482@20332L144:Effects.kt#9igjgp");
                ComposerKt.sourceInformationMarkerStart(composer, -954367824, "CC(remember):Effects.kt#9igjgp");
                Object rememberedValue2 = composer.rememberedValue();
                if (rememberedValue2 == Composer.Companion.getEmpty()) {
                    CompositionScopedCoroutineScopeCanceller compositionScopedCoroutineScopeCanceller = new CompositionScopedCoroutineScopeCanceller(EffectsKt.createCompositionCoroutineScope(EmptyCoroutineContext.INSTANCE, composer));
                    composer.updateRememberedValue(compositionScopedCoroutineScopeCanceller);
                    rememberedValue2 = compositionScopedCoroutineScopeCanceller;
                }
                ComposerKt.sourceInformationMarkerEnd(composer);
                CoroutineScope coroutineScope = ((CompositionScopedCoroutineScopeCanceller) rememberedValue2).getCoroutineScope();
                ComposerKt.sourceInformationMarkerEnd(composer);
                AuthenticationEntryActivity.this.getSnackbarComponent().bind(rememberEmpowerScaffoldState, coroutineScope);
                Presenter.LoadingViewState loadingViewState = (Presenter.LoadingViewState) mutableState.getValue();
                final AuthenticationEntryActivity authenticationEntryActivity2 = AuthenticationEntryActivity.this;
                AuthenticationEntryActivityKt.Content(loadingViewState, rememberEmpowerScaffoldState, new Function0<Unit>() {
                    {
                        super(0);
                    }

                    public Object invoke() {
                        m635invoke();
                        return Unit.INSTANCE;
                    }

                    public final void m635invoke() {
                        AnalyticsComponent analyticsComponent;
                        analyticsComponent = AuthenticationEntryActivity.this.getAnalyticsComponent();
                        analyticsComponent.trackReturnToLegacyApp("dev login swap icon press");
                        AuthenticationEntryActivity.this.getDynamicAppManager().switchToAppFamily("oriente", false, (Intent) null);
                    }
                }, null, composer, 0, 8);
                if (ComposerKt.isTraceInProgress()) {
                    ComposerKt.traceEventEnd();
                }
            }
        }), 1, (Object) null);
        String stringExtra = getIntent().getStringExtra(EXTRA_MOBILE_NUMBER);
        if (stringExtra != null) {
            getPresenter().bind(stringExtra, true);
        }
        FirebaseCrashlytics.getInstance().recordException(new LogicFailure("User is in authentication entry in production"));
        finish();
    }

    @Override
    protected void onStart() {
        super.onStart();
        getPresenter().onStart();
    }

    @Override
    protected void onStop() {
        getPresenter().onStop();
        super.onStop();
    }

    @Override
    public void render(Presenter.LoadingViewState<AuthenticationEntryPresenter.ViewContract.Content> viewState) {
        Intrinsics.checkNotNullParameter(viewState, "viewState");
        this.viewState.setValue(viewState);
    }

    @Override
    public void navigateToConfirmationCode(String phoneNumber, String accessChallenge, boolean isRegistration) {
        Intrinsics.checkNotNullParameter(phoneNumber, "phoneNumber");
        Intrinsics.checkNotNullParameter(accessChallenge, "accessChallenge");
        startActivity(ConfirmationCodeActivity.INSTANCE.newIntent((Context) this, phoneNumber, accessChallenge, isRegistration));
    }

    @Override
    public void navigateToResetPassword() {
        ActivityResultLauncher<Intent> activityResultLauncher = this.snackbarResultLauncher;
        if (activityResultLauncher == null) {
            Intrinsics.throwUninitializedPropertyAccessException("snackbarResultLauncher");
            activityResultLauncher = null;
        }
        activityResultLauncher.launch(ResetPasswordActivity.INSTANCE.newIntent((Context) this));
    }
}