正在查看: BodyTech v7.6.4 应用的 PaymentLauncherConfirmationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: BodyTech v7.6.4 应用的 PaymentLauncherConfirmationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.stripe.android.payments.paymentlauncher;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.OnBackPressedCallback;
import androidx.activity.OnBackPressedDispatcher;
import androidx.activity.OnBackPressedDispatcherKt;
import androidx.appcompat.app.AppCompatActivity;
import androidx.compose.runtime.internal.StabilityInferred;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
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.core.exception.StripeException;
import com.stripe.android.payments.core.analytics.ErrorReporter;
import com.stripe.android.payments.paymentlauncher.PaymentLauncherViewModel;
import com.stripe.android.payments.paymentlauncher.a;
import com.stripe.android.payments.paymentlauncher.c;
import java.util.ArrayList;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.r;
import kotlin.jvm.internal.v;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
@StabilityInferred(parameters = 0)
@Metadata(d1 = {"\u00004\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\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\t\b\u0000\u0018\u0000 !2\u00020\u0001:\u0001\"B\u0007¢\u0006\u0004\b \u0010\u0018J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0012\u0010\b\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006H\u0014J\b\u0010\t\u001a\u00020\u0004H\u0016R\u001d\u0010\u000f\u001a\u0004\u0018\u00010\n8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u000b\u0010\f\u001a\u0004\b\r\u0010\u000eR(\u0010\u0019\u001a\u00020\u00108\u0000@\u0000X\u0081\u000e¢\u0006\u0018\n\u0004\b\u0011\u0010\u0012\u0012\u0004\b\u0017\u0010\u0018\u001a\u0004\b\u0013\u0010\u0014\"\u0004\b\u0015\u0010\u0016R!\u0010\u001f\u001a\u00020\u001a8@X\u0081\u0084\u0002¢\u0006\u0012\n\u0004\b\u001b\u0010\f\u0012\u0004\b\u001e\u0010\u0018\u001a\u0004\b\u001c\u0010\u001d¨\u0006#"}, d2 = {"Lcom/stripe/android/payments/paymentlauncher/PaymentLauncherConfirmationActivity;", "Landroidx/appcompat/app/AppCompatActivity;", "Lcom/stripe/android/payments/paymentlauncher/a;", "result", "", "C", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "finish", "Lcom/stripe/android/payments/paymentlauncher/c$a;", "c", "Lkotlin/Lazy;", "D", "()Lcom/stripe/android/payments/paymentlauncher/c$a;", "starterArgs", "Landroidx/lifecycle/ViewModelProvider$Factory;", "d", "Landroidx/lifecycle/ViewModelProvider$Factory;", "F", "()Landroidx/lifecycle/ViewModelProvider$Factory;", "setViewModelFactory$payments_core_release", "(Landroidx/lifecycle/ViewModelProvider$Factory;)V", "getViewModelFactory$payments_core_release$annotations", "()V", "viewModelFactory", "Lcom/stripe/android/payments/paymentlauncher/PaymentLauncherViewModel;", "e", "E", "()Lcom/stripe/android/payments/paymentlauncher/PaymentLauncherViewModel;", "getViewModel$payments_core_release$annotations", "viewModel", "<init>", "n", "a", "payments-core_release"}, k = 1, mv = {1, 9, 0})
@Instrumented
public final class PaymentLauncherConfirmationActivity extends AppCompatActivity implements TraceFieldInterface {
public static final int p = 8;
private final Lazy starterArgs;
private ViewModelProvider.Factory viewModelFactory;
private final Lazy viewModel;
public Trace k;
public PaymentLauncherConfirmationActivity() {
Lazy b;
b = kotlin.d.b(new Function0<c.a>() {
{
super(0);
}
@Override
public final c.a invoke() {
c.a.Companion companion = c.a.INSTANCE;
Intent intent = PaymentLauncherConfirmationActivity.this.getIntent();
r.h(intent, "getIntent(...)");
return companion.a(intent);
}
});
this.starterArgs = b;
this.viewModelFactory = new PaymentLauncherViewModel.Factory(new Function0<c.a>() {
{
super(0);
}
@Override
public final c.a invoke() {
c.a D;
D = PaymentLauncherConfirmationActivity.this.D();
if (D != null) {
return D;
}
throw new IllegalArgumentException("Required value was null.".toString());
}
});
final Function0 function0 = null;
this.viewModel = new ViewModelLazy(v.b(PaymentLauncherViewModel.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() {
return PaymentLauncherConfirmationActivity.this.getViewModelFactory();
}
}, 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 void C(a result) {
setResult(-1, new Intent().putExtras(result.b()));
finish();
}
public final c.a D() {
return (c.a) this.starterArgs.getValue();
}
public final PaymentLauncherViewModel E() {
return (PaymentLauncherViewModel) this.viewModel.getValue();
}
public final ViewModelProvider.Factory getViewModelFactory() {
return this.viewModelFactory;
}
public void finish() {
super/*android.app.Activity*/.finish();
com.stripe.android.uicore.utils.c.a(this);
}
protected void onCreate(Bundle savedInstanceState) {
Object b;
c.a D;
TraceMachine.startTracing("PaymentLauncherConfirmationActivity");
try {
TraceMachine.enterMethod(this.k, "PaymentLauncherConfirmationActivity#onCreate", (ArrayList) null);
} catch (NoSuchFieldError unused) {
TraceMachine.enterMethod((Trace) null, "PaymentLauncherConfirmationActivity#onCreate", (ArrayList) null);
}
super/*androidx.fragment.app.FragmentActivity*/.onCreate(savedInstanceState);
try {
Result.Companion companion = Result.INSTANCE;
D = D();
} catch (Throwable th2) {
Result.Companion companion2 = Result.INSTANCE;
b = Result.b(kotlin.f.a(th2));
}
if (D == null) {
IllegalArgumentException illegalArgumentException = new IllegalArgumentException("PaymentLauncherConfirmationActivity was started without arguments".toString());
TraceMachine.exitMethod();
throw illegalArgumentException;
}
b = Result.b(D);
Throwable e = Result.e(b);
if (e != null) {
C(new a.d(e));
ErrorReporter.Companion companion3 = ErrorReporter.INSTANCE;
Context applicationContext = getApplicationContext();
r.h(applicationContext, "getApplicationContext(...)");
ErrorReporter.b.a(ErrorReporter.Companion.b(companion3, applicationContext, null, 2, null), ErrorReporter.ExpectedErrorEvent.x, StripeException.INSTANCE.b(e), null, 4, null);
TraceMachine.exitMethod();
return;
}
c.a aVar = (c.a) b;
OnBackPressedDispatcher onBackPressedDispatcher = getOnBackPressedDispatcher();
r.h(onBackPressedDispatcher, "<get-onBackPressedDispatcher>(...)");
OnBackPressedDispatcherKt.addCallback$default(onBackPressedDispatcher, (LifecycleOwner) null, false, new Function1<OnBackPressedCallback, Unit>() {
public final void invoke2(OnBackPressedCallback addCallback) {
r.i(addCallback, "$this$addCallback");
}
@Override
public Unit invoke(OnBackPressedCallback onBackPressedCallback) {
invoke2(onBackPressedCallback);
return Unit.a;
}
}, 3, (Object) null);
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), null, null, new PaymentLauncherConfirmationActivity$onCreate$2(this, null), 3, null);
E().D(this, this);
com.stripe.android.view.i a = com.stripe.android.view.i.INSTANCE.a(this, aVar.getStatusBarColor());
if (aVar instanceof c.a.IntentConfirmationArgs) {
E().r(((c.a.IntentConfirmationArgs) aVar).getConfirmStripeIntentParams(), a);
} else if (aVar instanceof c.a.PaymentIntentNextActionArgs) {
E().v(((c.a.PaymentIntentNextActionArgs) aVar).getPaymentIntentClientSecret(), a);
} else if (aVar instanceof c.a.SetupIntentNextActionArgs) {
E().v(((c.a.SetupIntentNextActionArgs) aVar).getSetupIntentClientSecret(), a);
}
TraceMachine.exitMethod();
}
protected void onStart() {
super.onStart();
ApplicationStateMonitor.getInstance().activityStarted();
}
protected void onStop() {
super.onStop();
ApplicationStateMonitor.getInstance().activityStopped();
}
}