导航菜单

页面标题

页面副标题

BodyTech v7.6.4 - CollectBankAccountActivity.java 源代码

正在查看: BodyTech v7.6.4 应用的 CollectBankAccountActivity.java JAVA 源代码文件

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


package com.stripe.android.payments.bankaccount.ui;

import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.compose.runtime.internal.StabilityInferred;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import ci.a;
import com.newrelic.agent.android.api.v2.TraceFieldInterface;
import com.newrelic.agent.android.background.ApplicationStateMonitor;
import com.newrelic.agent.android.instrumentation.Instrumented;
import com.newrelic.agent.android.tracing.Trace;
import com.newrelic.agent.android.tracing.TraceMachine;
import com.stripe.android.payments.bankaccount.ui.CollectBankAccountViewModel;
import com.stripe.android.payments.bankaccount.ui.a;
import com.stripe.android.payments.financialconnections.FinancialConnectionsPaymentsProxy;
import di.a;
import di.e;
import java.util.ArrayList;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.d;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.r;
import kotlin.jvm.internal.v;

@StabilityInferred(parameters = 0)
@Metadata(d1 = {"\u0000@\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0000\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u001c\u0010\u001dJ\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\f\u0010\u0007\u001a\u00020\u0004*\u00020\u0006H\u0002J\f\u0010\t\u001a\u00020\u0004*\u00020\bH\u0002J\u0012\u0010\f\u001a\u00020\u00042\b\u0010\u000b\u001a\u0004\u0018\u00010\nH\u0014R\u001d\u0010\u0012\u001a\u0004\u0018\u00010\r8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u000e\u0010\u000f\u001a\u0004\b\u0010\u0010\u0011R\u0016\u0010\u0016\u001a\u00020\u00138\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\u0014\u0010\u0015R\u001b\u0010\u001b\u001a\u00020\u00178BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0018\u0010\u000f\u001a\u0004\b\u0019\u0010\u001a¨\u0006\u001e"}, d2 = {"Lcom/stripe/android/payments/bankaccount/ui/CollectBankAccountActivity;", "Landroidx/appcompat/app/AppCompatActivity;", "Lci/a;", "configuration", "", "G", "Lcom/stripe/android/payments/bankaccount/ui/a$b;", "I", "Lcom/stripe/android/payments/bankaccount/ui/a$a;", "H", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "Ldi/a$a;", "c", "Lkotlin/Lazy;", "E", "()Ldi/a$a;", "starterArgs", "Lcom/stripe/android/payments/financialconnections/FinancialConnectionsPaymentsProxy;", "d", "Lcom/stripe/android/payments/financialconnections/FinancialConnectionsPaymentsProxy;", "financialConnectionsPaymentsProxy", "Lcom/stripe/android/payments/bankaccount/ui/CollectBankAccountViewModel;", "e", "F", "()Lcom/stripe/android/payments/bankaccount/ui/CollectBankAccountViewModel;", "viewModel", "<init>", "()V", "payments-core_release"}, k = 1, mv = {1, 9, 0})
@Instrumented
public final class CollectBankAccountActivity extends AppCompatActivity implements TraceFieldInterface {

    private final Lazy starterArgs;

    private FinancialConnectionsPaymentsProxy financialConnectionsPaymentsProxy;

    private final Lazy viewModel;
    public Trace k;

    public CollectBankAccountActivity() {
        Lazy b;
        b = d.b(new Function0<a.AbstractC0210a>() {
            {
                super(0);
            }

            @Override
            public final a.AbstractC0210a invoke() {
                a.AbstractC0210a.Companion companion = a.AbstractC0210a.INSTANCE;
                Intent intent = CollectBankAccountActivity.this.getIntent();
                r.h(intent, "getIntent(...)");
                return companion.a(intent);
            }
        });
        this.starterArgs = b;
        final Function0 function0 = null;
        this.viewModel = new ViewModelLazy(v.b(CollectBankAccountViewModel.class), new Function0<ViewModelStore>() {
            {
                super(0);
            }

            @Override
            public final ViewModelStore invoke() {
                return this.getViewModelStore();
            }
        }, new Function0<ViewModelProvider.Factory>() {
            {
                super(0);
            }

            @Override
            public final ViewModelProvider.Factory invoke() {
                final CollectBankAccountActivity collectBankAccountActivity = CollectBankAccountActivity.this;
                return new CollectBankAccountViewModel.b(new Function0<a.AbstractC0210a>() {
                    {
                        super(0);
                    }

                    @Override
                    public final a.AbstractC0210a invoke() {
                        a.AbstractC0210a E;
                        E = CollectBankAccountActivity.this.E();
                        if (E != null) {
                            return E;
                        }
                        throw new IllegalArgumentException("Required value was null.".toString());
                    }
                });
            }
        }, new Function0<CreationExtras>() {
            {
                super(0);
            }

            @Override
            public final CreationExtras invoke() {
                CreationExtras creationExtras;
                Function0 function02 = Function0.this;
                return (function02 == null || (creationExtras = (CreationExtras) function02.invoke()) == null) ? this.getDefaultViewModelCreationExtras() : creationExtras;
            }
        });
    }

    public final a.AbstractC0210a E() {
        return (a.AbstractC0210a) this.starterArgs.getValue();
    }

    public final CollectBankAccountViewModel F() {
        return (CollectBankAccountViewModel) this.viewModel.getValue();
    }

    private final void G(ci.a configuration) {
        FinancialConnectionsPaymentsProxy b;
        if (configuration instanceof a.InstantDebits) {
            b = FinancialConnectionsPaymentsProxy.Companion.d(FinancialConnectionsPaymentsProxy.INSTANCE, this, new CollectBankAccountActivity$initConnectionsPaymentsProxy$1(F()), null, null, 12, null);
        } else {
            if (!(configuration instanceof a.USBankAccount)) {
                throw new NoWhenBranchMatchedException();
            }
            b = FinancialConnectionsPaymentsProxy.Companion.b(FinancialConnectionsPaymentsProxy.INSTANCE, this, new CollectBankAccountActivity$initConnectionsPaymentsProxy$2(F()), null, null, 12, null);
        }
        this.financialConnectionsPaymentsProxy = b;
    }

    public final void H(a.FinishWithResult finishWithResult) {
        setResult(-1, new Intent().putExtras(new a.Result(finishWithResult.getResult()).c()));
        finish();
    }

    public final void I(a.OpenConnectionsFlow openConnectionsFlow) {
        FinancialConnectionsPaymentsProxy financialConnectionsPaymentsProxy = this.financialConnectionsPaymentsProxy;
        if (financialConnectionsPaymentsProxy == null) {
            r.A("financialConnectionsPaymentsProxy");
            financialConnectionsPaymentsProxy = null;
        }
        financialConnectionsPaymentsProxy.a(openConnectionsFlow.getFinancialConnectionsSessionSecret(), openConnectionsFlow.getPublishableKey(), openConnectionsFlow.getStripeAccountId());
    }

    protected void onCreate(Bundle savedInstanceState) {
        TraceMachine.startTracing("CollectBankAccountActivity");
        try {
            TraceMachine.enterMethod(this.k, "CollectBankAccountActivity#onCreate", (ArrayList) null);
        } catch (NoSuchFieldError unused) {
            TraceMachine.enterMethod((Trace) null, "CollectBankAccountActivity#onCreate", (ArrayList) null);
        }
        super/*androidx.fragment.app.FragmentActivity*/.onCreate(savedInstanceState);
        a.AbstractC0210a E = E();
        if ((E != null ? E.getConfiguration() : null) == null) {
            H(new a.FinishWithResult(new e.Failed(new IllegalStateException("Configuration not provided"))));
        } else {
            a.AbstractC0210a E2 = E();
            if (E2 == null) {
                IllegalArgumentException illegalArgumentException = new IllegalArgumentException("Required value was null.".toString());
                TraceMachine.exitMethod();
                throw illegalArgumentException;
            }
            G(E2.getConfiguration());
            LifecycleOwnerKt.getLifecycleScope(this).launchWhenStarted(new CollectBankAccountActivity$onCreate$1(this, null));
        }
        TraceMachine.exitMethod();
    }

    protected void onStart() {
        super.onStart();
        ApplicationStateMonitor.getInstance().activityStarted();
    }

    protected void onStop() {
        super.onStop();
        ApplicationStateMonitor.getInstance().activityStopped();
    }
}