正在查看: Rilo v2.0.21 应用的 BacsMandateConfirmationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Rilo v2.0.21 应用的 BacsMandateConfirmationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.stripe.android.paymentsheet.paymentdatacollection.bacs;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import androidx.activity.ComponentActivity;
import androidx.activity.OnBackPressedCallback;
import androidx.activity.OnBackPressedDispatcher;
import androidx.activity.OnBackPressedDispatcherKt;
import androidx.activity.compose.ComponentActivityKt;
import androidx.appcompat.app.AppCompatActivity;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.CompositionContext;
import androidx.compose.runtime.EffectsKt;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import androidx.compose.ui.Modifier;
import androidx.core.view.WindowCompat;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import com.stripe.android.common.ui.BottomSheetKt;
import com.stripe.android.common.ui.BottomSheetState;
import com.stripe.android.paymentsheet.PaymentSheetConfigurationKtxKt;
import com.stripe.android.paymentsheet.R;
import com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationContract;
import com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationResult;
import com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationViewAction;
import com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationViewModel;
import com.stripe.android.paymentsheet.ui.PaymentSheetScaffoldKt;
import com.stripe.android.paymentsheet.ui.PaymentSheetTopBarKt;
import com.stripe.android.paymentsheet.ui.PaymentSheetTopBarState;
import com.stripe.android.uicore.StripeThemeKt;
import com.stripe.android.utils.AnimationConstants;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.FlowKt;
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0000\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\u000e\u001a\u00020\u000fH\u0016J\u0012\u0010\u0010\u001a\u00020\u000f2\b\u0010\u0011\u001a\u0004\u0018\u00010\u0012H\u0015J\b\u0010\u0013\u001a\u00020\u000fH\u0002R\u001b\u0010\u0003\u001a\u00020\u00048BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0007\u0010\b\u001a\u0004\b\u0005\u0010\u0006R\u001b\u0010\t\u001a\u00020\n8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\r\u0010\b\u001a\u0004\b\u000b\u0010\f¨\u0006\u0014"}, d2 = {"Lcom/stripe/android/paymentsheet/paymentdatacollection/bacs/BacsMandateConfirmationActivity;", "Landroidx/appcompat/app/AppCompatActivity;", "()V", "starterArgs", "Lcom/stripe/android/paymentsheet/paymentdatacollection/bacs/BacsMandateConfirmationContract$Args;", "getStarterArgs", "()Lcom/stripe/android/paymentsheet/paymentdatacollection/bacs/BacsMandateConfirmationContract$Args;", "starterArgs$delegate", "Lkotlin/Lazy;", "viewModel", "Lcom/stripe/android/paymentsheet/paymentdatacollection/bacs/BacsMandateConfirmationViewModel;", "getViewModel", "()Lcom/stripe/android/paymentsheet/paymentdatacollection/bacs/BacsMandateConfirmationViewModel;", "viewModel$delegate", "finish", "", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "renderEdgeToEdge", "paymentsheet_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class BacsMandateConfirmationActivity extends AppCompatActivity {
private final Lazy starterArgs = LazyKt.lazy(new Function0<BacsMandateConfirmationContract.Args>() {
{
super(0);
}
public final BacsMandateConfirmationContract.Args m483invoke() {
BacsMandateConfirmationContract.Args.Companion companion = BacsMandateConfirmationContract.Args.INSTANCE;
Intent intent = BacsMandateConfirmationActivity.this.getIntent();
Intrinsics.checkNotNullExpressionValue(intent, "intent");
BacsMandateConfirmationContract.Args fromIntent = companion.fromIntent(intent);
if (fromIntent != null) {
return fromIntent;
}
throw new IllegalStateException("Cannot start Bacs mandate confirmation flow without arguments");
}
});
private final Lazy viewModel;
public BacsMandateConfirmationActivity() {
final ComponentActivity componentActivity = (ComponentActivity) this;
final Function0 function0 = null;
this.viewModel = new ViewModelLazy(Reflection.getOrCreateKotlinClass(BacsMandateConfirmationViewModel.class), new Function0<ViewModelStore>() {
{
super(0);
}
public final ViewModelStore m478invoke() {
ViewModelStore viewModelStore = componentActivity.getViewModelStore();
Intrinsics.checkNotNullExpressionValue(viewModelStore, "viewModelStore");
return viewModelStore;
}
}, new Function0<ViewModelProvider.Factory>() {
{
super(0);
}
public final ViewModelProvider.Factory m484invoke() {
BacsMandateConfirmationContract.Args starterArgs;
starterArgs = BacsMandateConfirmationActivity.this.getStarterArgs();
return new BacsMandateConfirmationViewModel.Factory(starterArgs);
}
}, new Function0<CreationExtras>() {
{
super(0);
}
public final CreationExtras m479invoke() {
CreationExtras creationExtras;
Function0 function02 = function0;
if (function02 != null && (creationExtras = (CreationExtras) function02.invoke()) != null) {
return creationExtras;
}
CreationExtras defaultViewModelCreationExtras = componentActivity.getDefaultViewModelCreationExtras();
Intrinsics.checkNotNullExpressionValue(defaultViewModelCreationExtras, "this.defaultViewModelCreationExtras");
return defaultViewModelCreationExtras;
}
});
}
public final BacsMandateConfirmationContract.Args getStarterArgs() {
return (BacsMandateConfirmationContract.Args) this.starterArgs.getValue();
}
public final BacsMandateConfirmationViewModel getViewModel() {
return (BacsMandateConfirmationViewModel) this.viewModel.getValue();
}
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT != 26) {
setRequestedOrientation(1);
}
renderEdgeToEdge();
OnBackPressedDispatcher onBackPressedDispatcher = getOnBackPressedDispatcher();
Intrinsics.checkNotNullExpressionValue(onBackPressedDispatcher, "onBackPressedDispatcher");
OnBackPressedDispatcherKt.addCallback$default(onBackPressedDispatcher, (LifecycleOwner) null, false, new Function1<OnBackPressedCallback, Unit>() {
{
super(1);
}
public Object invoke(Object obj) {
invoke((OnBackPressedCallback) obj);
return Unit.INSTANCE;
}
public final void invoke(OnBackPressedCallback onBackPressedCallback) {
BacsMandateConfirmationViewModel viewModel;
Intrinsics.checkNotNullParameter(onBackPressedCallback, "$this$addCallback");
viewModel = BacsMandateConfirmationActivity.this.getViewModel();
viewModel.handleViewAction(BacsMandateConfirmationViewAction.OnBackPressed.INSTANCE);
}
}, 3, (Object) null);
PaymentSheetConfigurationKtxKt.parseAppearance(getStarterArgs().getAppearance());
ComponentActivityKt.setContent$default((ComponentActivity) this, (CompositionContext) null, ComposableLambdaKt.composableLambdaInstance(1408942397, 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 i2) {
if ((i2 & 11) != 2 || !composer.getSkipping()) {
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventStart(1408942397, i2, -1, "com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationActivity.onCreate.<anonymous> (BacsMandateConfirmationActivity.kt:57)");
}
final BacsMandateConfirmationActivity bacsMandateConfirmationActivity = BacsMandateConfirmationActivity.this;
StripeThemeKt.StripeTheme(null, null, null, ComposableLambdaKt.composableLambda(composer, -723148693, 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 composer2, int i3) {
if ((i3 & 11) != 2 || !composer2.getSkipping()) {
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventStart(-723148693, i3, -1, "com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationActivity.onCreate.<anonymous>.<anonymous> (BacsMandateConfirmationActivity.kt:58)");
}
BottomSheetState rememberBottomSheetState = BottomSheetKt.rememberBottomSheetState((Function1) null, composer2, 0, 1);
EffectsKt.LaunchedEffect(rememberBottomSheetState, new C00151(BacsMandateConfirmationActivity.this, rememberBottomSheetState, null), composer2, 72);
final BacsMandateConfirmationActivity bacsMandateConfirmationActivity2 = BacsMandateConfirmationActivity.this;
Function0<Unit> function0 = new Function0<Unit>() {
{
super(0);
}
public Object invoke() {
m480invoke();
return Unit.INSTANCE;
}
public final void m480invoke() {
BacsMandateConfirmationViewModel viewModel;
viewModel = BacsMandateConfirmationActivity.this.getViewModel();
viewModel.handleViewAction(BacsMandateConfirmationViewAction.OnBackPressed.INSTANCE);
}
};
final BacsMandateConfirmationActivity bacsMandateConfirmationActivity3 = BacsMandateConfirmationActivity.this;
BottomSheetKt.BottomSheet(rememberBottomSheetState, (Modifier) null, function0, ComposableLambdaKt.composableLambda(composer2, -1926792059, 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 composer3, int i4) {
if ((i4 & 11) != 2 || !composer3.getSkipping()) {
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventStart(-1926792059, i4, -1, "com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationActivity.onCreate.<anonymous>.<anonymous>.<anonymous> (BacsMandateConfirmationActivity.kt:77)");
}
final BacsMandateConfirmationActivity bacsMandateConfirmationActivity4 = BacsMandateConfirmationActivity.this;
Function2 composableLambda = ComposableLambdaKt.composableLambda(composer3, -1139347935, 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 composer4, int i5) {
if ((i5 & 11) != 2 || !composer4.getSkipping()) {
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventStart(-1139347935, i5, -1, "com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationActivity.onCreate.<anonymous>.<anonymous>.<anonymous>.<anonymous> (BacsMandateConfirmationActivity.kt:79)");
}
PaymentSheetTopBarState paymentSheetTopBarState = new PaymentSheetTopBarState(R.drawable.stripe_ic_paymentsheet_close, com.stripe.android.ui.core.R.string.stripe_back, false, false, com.stripe.android.R.string.stripe_edit, true);
final BacsMandateConfirmationActivity bacsMandateConfirmationActivity5 = BacsMandateConfirmationActivity.this;
PaymentSheetTopBarKt.m601PaymentSheetTopBarjt2gSs(paymentSheetTopBarState, new Function0<Unit>() {
{
super(0);
}
public Object invoke() {
m481invoke();
return Unit.INSTANCE;
}
public final void m481invoke() {
BacsMandateConfirmationViewModel viewModel;
viewModel = BacsMandateConfirmationActivity.this.getViewModel();
viewModel.handleViewAction(BacsMandateConfirmationViewAction.OnBackPressed.INSTANCE);
}
}, new Function0<Unit>() {
public final void m482invoke() {
}
public Object invoke() {
m482invoke();
return Unit.INSTANCE;
}
}, 0.0f, composer4, 392, 8);
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventEnd();
return;
}
return;
}
composer4.skipToGroupEnd();
}
});
final BacsMandateConfirmationActivity bacsMandateConfirmationActivity5 = BacsMandateConfirmationActivity.this;
PaymentSheetScaffoldKt.PaymentSheetScaffold(composableLambda, ComposableLambdaKt.composableLambda(composer3, 1255702882, 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 composer4, int i5) {
BacsMandateConfirmationViewModel viewModel;
if ((i5 & 11) == 2 && composer4.getSkipping()) {
composer4.skipToGroupEnd();
return;
}
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventStart(1255702882, i5, -1, "com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationActivity.onCreate.<anonymous>.<anonymous>.<anonymous>.<anonymous> (BacsMandateConfirmationActivity.kt:95)");
}
viewModel = BacsMandateConfirmationActivity.this.getViewModel();
BacsMandateConfirmationFormKt.BacsMandateConfirmationFormScreen(viewModel, composer4, 8, 0);
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventEnd();
}
}
}), null, composer3, 54, 4);
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventEnd();
return;
}
return;
}
composer3.skipToGroupEnd();
}
}), composer2, 3080, 2);
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventEnd();
return;
}
return;
}
composer2.skipToGroupEnd();
}
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 8, 0}, xi = 48)
@DebugMetadata(c = "com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationActivity$onCreate$2$1$1", f = "BacsMandateConfirmationActivity.kt", i = {}, l = {63}, m = "invokeSuspend", n = {}, s = {})
static final class C00151 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
final BottomSheetState $bottomSheetState;
int label;
final BacsMandateConfirmationActivity this$0;
C00151(BacsMandateConfirmationActivity bacsMandateConfirmationActivity, BottomSheetState bottomSheetState, Continuation<? super C00151> continuation) {
super(2, continuation);
this.this$0 = bacsMandateConfirmationActivity;
this.$bottomSheetState = bottomSheetState;
}
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new C00151(this.this$0, this.$bottomSheetState, continuation);
}
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return create(coroutineScope, continuation).invokeSuspend(Unit.INSTANCE);
}
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\u008a@"}, d2 = {"<anonymous>", "", "result", "Lcom/stripe/android/paymentsheet/paymentdatacollection/bacs/BacsMandateConfirmationResult;"}, k = 3, mv = {1, 8, 0}, xi = 48)
@DebugMetadata(c = "com.stripe.android.paymentsheet.paymentdatacollection.bacs.BacsMandateConfirmationActivity$onCreate$2$1$1$1", f = "BacsMandateConfirmationActivity.kt", i = {}, l = {68}, m = "invokeSuspend", n = {}, s = {})
static final class C00161 extends SuspendLambda implements Function2<BacsMandateConfirmationResult, Continuation<? super Unit>, Object> {
final BottomSheetState $bottomSheetState;
Object L$0;
int label;
final BacsMandateConfirmationActivity this$0;
C00161(BacsMandateConfirmationActivity bacsMandateConfirmationActivity, BottomSheetState bottomSheetState, Continuation<? super C00161> continuation) {
super(2, continuation);
this.this$0 = bacsMandateConfirmationActivity;
this.$bottomSheetState = bottomSheetState;
}
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
Continuation<Unit> c00161 = new C00161(this.this$0, this.$bottomSheetState, continuation);
c00161.L$0 = obj;
return c00161;
}
public final Object invoke(BacsMandateConfirmationResult bacsMandateConfirmationResult, Continuation<? super Unit> continuation) {
return create(bacsMandateConfirmationResult, continuation).invokeSuspend(Unit.INSTANCE);
}
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i2 = this.label;
if (i2 == 0) {
ResultKt.throwOnFailure(obj);
BacsMandateConfirmationResult bacsMandateConfirmationResult = (BacsMandateConfirmationResult) this.L$0;
BacsMandateConfirmationActivity bacsMandateConfirmationActivity = this.this$0;
BacsMandateConfirmationResult.Companion companion = BacsMandateConfirmationResult.INSTANCE;
Intent intent = this.this$0.getIntent();
Intrinsics.checkNotNullExpressionValue(intent, "intent");
bacsMandateConfirmationActivity.setResult(-1, companion.toIntent(intent, bacsMandateConfirmationResult));
this.label = 1;
if (this.$bottomSheetState.hide((Continuation) this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i2 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
this.this$0.finish();
return Unit.INSTANCE;
}
}
public final Object invokeSuspend(Object obj) {
BacsMandateConfirmationViewModel viewModel;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i2 = this.label;
if (i2 == 0) {
ResultKt.throwOnFailure(obj);
viewModel = this.this$0.getViewModel();
this.label = 1;
if (FlowKt.collectLatest(viewModel.getResult(), new C00161(this.this$0, this.$bottomSheetState, null), (Continuation) this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i2 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}
}), composer, 3072, 7);
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventEnd();
return;
}
return;
}
composer.skipToGroupEnd();
}
}), 1, (Object) null);
}
public void finish() {
super.finish();
overridePendingTransition(AnimationConstants.INSTANCE.getFADE_IN(), AnimationConstants.INSTANCE.getFADE_OUT());
}
private final void renderEdgeToEdge() {
if (Build.VERSION.SDK_INT < 30) {
return;
}
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
}
}