导航菜单

页面标题

页面副标题

Perplexity v2.48.1 - CustomPaymentMethodProxyActivity.java 源代码

正在查看: Perplexity v2.48.1 应用的 CustomPaymentMethodProxyActivity.java JAVA 源代码文件

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


package com.stripe.android.paymentelement.confirmation.cpms;

import J3.n;
import Vi.i;
import Vi.j;
import Vi.k;
import Vi.l;
import Wi.a;
import Zi.d;
import Zi.e;
import Zi.f;
import android.content.Intent;
import android.os.Bundle;
import com.google.common.util.concurrent.x;
import com.stripe.android.core.exception.LocalStripeException;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import wj.C1742q0;

@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0001\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/stripe/android/paymentelement/confirmation/cpms/CustomPaymentMethodProxyActivity;", "LJ3/n;", "<init>", "()V", "paymentsheet_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
@SourceDebugExtension
public final class CustomPaymentMethodProxyActivity extends n {
    public boolean x;

    public final void onCreate(Bundle bundle) {
        super/*androidx.fragment.app.P*/.onCreate(bundle);
        if (bundle != null) {
            this.x = bundle.getBoolean("has_confirm_started");
        }
        Bundle extras = getIntent().getExtras();
        C1742q0 c1742q0 = extras != null ? (C1742q0) x.z(extras, "extra_custom_method_type", C1742q0.class) : null;
        String stringExtra = getIntent().getStringExtra("payment_element_identifier");
        if (extras != null) {
        }
        if (c1742q0 == null || this.x || stringExtra == null) {
            return;
        }
        this.x = true;
        a.a(stringExtra);
    }

    public final void onNewIntent(Intent intent) {
        Intrinsics.h(intent, "intent");
        super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
        setIntent(intent);
    }

    public final void onResume() {
        Object fVar;
        super/*androidx.fragment.app.P*/.onResume();
        Bundle extras = getIntent().getExtras();
        if (extras == null) {
            finish();
            return;
        }
        C1742q0 c1742q0 = (C1742q0) x.z(extras, "extra_custom_method_type", C1742q0.class);
        l lVar = (l) x.z(extras, "custom_payment_method_result", l.class);
        if (c1742q0 == null && lVar == null) {
            finish();
            return;
        }
        if (lVar != null) {
            if (lVar instanceof j) {
                fVar = e.w;
            } else if (lVar instanceof i) {
                fVar = d.w;
            } else {
                if (!(lVar instanceof k)) {
                    throw new NoWhenBranchMatchedException();
                }
                fVar = new f(new LocalStripeException(((k) lVar).w, "customPaymentMethodFailure"));
            }
            setResult(-1, new Intent().putExtras(g4.f.s(new Pair[]{new Pair("CUSTOM_PAYMENT_METHOD_RESULT", fVar)})));
            finish();
        }
    }

    public final void onSaveInstanceState(Bundle outState) {
        Intrinsics.h(outState, "outState");
        outState.putBoolean("has_confirm_started", this.x);
        super/*androidx.activity.ComponentActivity*/.onSaveInstanceState(outState);
    }
}