正在查看: Crafto v9.3.3 应用的 PaymentLauncherConfirmationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 PaymentLauncherConfirmationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.stripe.android.payments.paymentlauncher;
import Hk.k;
import Hk.l;
import Hk.p;
import Hk.q;
import android.app.Application;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.T;
import androidx.lifecycle.u0;
import androidx.lifecycle.v0;
import androidx.lifecycle.x0;
import com.stripe.android.payments.paymentlauncher.PaymentLauncherContract;
import com.stripe.android.payments.paymentlauncher.PaymentLauncherViewModel;
import com.stripe.android.payments.paymentlauncher.PaymentResult;
import com.stripe.android.view.AuthActivityStarterHost;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import org.jetbrains.annotations.NotNull;
@Metadata
public final class PaymentLauncherConfirmationActivity extends AppCompatActivity {
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
public static final String EMPTY_ARG_ERROR = "PaymentLauncherConfirmationActivity was started without arguments";
@NotNull
private final k starterArgs$delegate = l.b(new Function0<PaymentLauncherContract.Args>() {
{
super(0);
}
public final PaymentLauncherContract.Args m525invoke() {
PaymentLauncherContract.Args.Companion companion = PaymentLauncherContract.Args.Companion;
Intent intent = PaymentLauncherConfirmationActivity.this.getIntent();
Intrinsics.checkNotNullExpressionValue(intent, "intent");
return companion.fromIntent(intent);
}
});
@NotNull
private v0.b viewModelFactory = new PaymentLauncherViewModel.Factory(new Function0<PaymentLauncherContract.Args>() {
{
super(0);
}
@NotNull
public final PaymentLauncherContract.Args m527invoke() {
PaymentLauncherContract.Args starterArgs;
starterArgs = PaymentLauncherConfirmationActivity.this.getStarterArgs();
if (starterArgs != null) {
return starterArgs;
}
throw new IllegalArgumentException("Required value was null.".toString());
}
}, new Function0<Application>() {
{
super(0);
}
@NotNull
public final Application m528invoke() {
Application application = PaymentLauncherConfirmationActivity.this.getApplication();
Intrinsics.checkNotNullExpressionValue(application, "application");
return application;
}
}, this);
@NotNull
private final k viewModel$delegate = new u0(Reflection.getOrCreateKotlinClass(PaymentLauncherViewModel.class), new Function0<x0>() {
{
super(0);
}
@NotNull
public final x0 m524invoke() {
x0 viewModelStore = this.getViewModelStore();
Intrinsics.checkNotNullExpressionValue(viewModelStore, "viewModelStore");
return viewModelStore;
}
}, new Function0<v0.b>() {
{
super(0);
}
@NotNull
public final v0.b m526invoke() {
return PaymentLauncherConfirmationActivity.this.getViewModelFactory$payments_core_release();
}
});
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
private final void disableAnimations() {
overridePendingTransition(0, 0);
}
public final void finishWithResult(PaymentResult paymentResult) {
setResult(-1, new Intent().putExtras(paymentResult.toBundle()));
finish();
}
public final PaymentLauncherContract.Args getStarterArgs() {
return (PaymentLauncherContract.Args) this.starterArgs$delegate.getValue();
}
public void finish() {
super/*android.app.Activity*/.finish();
disableAnimations();
}
@NotNull
public final PaymentLauncherViewModel getViewModel$payments_core_release() {
return (PaymentLauncherViewModel) this.viewModel$delegate.getValue();
}
@NotNull
public final v0.b getViewModelFactory$payments_core_release() {
return this.viewModelFactory;
}
public void onCreate(Bundle bundle) {
PaymentLauncherContract.Args a;
super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
disableAnimations();
try {
p.a aVar = p.b;
a = getStarterArgs();
} catch (Throwable th) {
p.a aVar2 = p.b;
a = q.a(th);
}
if (a == null) {
throw new IllegalArgumentException(EMPTY_ARG_ERROR.toString());
}
Throwable a2 = p.a(a);
if (a2 != null) {
finishWithResult(new PaymentResult.Failed(a2));
return;
}
PaymentLauncherContract.Args args = a;
Integer statusBarColor = args.getStatusBarColor();
if (statusBarColor != null) {
getWindow().setStatusBarColor(statusBarColor.intValue());
}
getViewModel$payments_core_release().getPaymentLauncherResult$payments_core_release().observe(this, new T() {
public final void onChanged(Object obj) {
PaymentLauncherConfirmationActivity.this.finishWithResult((PaymentResult) obj);
}
});
getViewModel$payments_core_release().register$payments_core_release(this);
AuthActivityStarterHost create$payments_core_release = AuthActivityStarterHost.Companion.create$payments_core_release(this);
if (args instanceof PaymentLauncherContract.Args.IntentConfirmationArgs) {
getViewModel$payments_core_release().confirmStripeIntent$payments_core_release(((PaymentLauncherContract.Args.IntentConfirmationArgs) args).getConfirmStripeIntentParams(), create$payments_core_release);
} else if (args instanceof PaymentLauncherContract.Args.PaymentIntentNextActionArgs) {
getViewModel$payments_core_release().handleNextActionForStripeIntent$payments_core_release(((PaymentLauncherContract.Args.PaymentIntentNextActionArgs) args).getPaymentIntentClientSecret(), create$payments_core_release);
} else if (args instanceof PaymentLauncherContract.Args.SetupIntentNextActionArgs) {
getViewModel$payments_core_release().handleNextActionForStripeIntent$payments_core_release(((PaymentLauncherContract.Args.SetupIntentNextActionArgs) args).getSetupIntentClientSecret(), create$payments_core_release);
}
}
public void onDestroy() {
super.onDestroy();
getViewModel$payments_core_release().cleanUp$payments_core_release();
}
public final void setViewModelFactory$payments_core_release(@NotNull v0.b bVar) {
Intrinsics.checkNotNullParameter(bVar, "<set-?>");
this.viewModelFactory = bVar;
}
public static void getViewModel$payments_core_release$annotations() {
}
public static void getViewModelFactory$payments_core_release$annotations() {
}
}