Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45
以下内容为反编译后的 x2.java 源代码,内容仅作参考
package com.braintreepayments.api;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.fragment.app.FragmentActivity;
import androidx.view.AbstractC4865k;
public class x2 {
private final i0 f26301a;
private final p f26302b;
private final f3 f26303c;
private final u2 f26304d;
c0 f26305e;
ThreeDSecureLifecycleObserver f26306f;
class a implements s0 {
final e3 f26307a;
final FragmentActivity f26308b;
final c3 f26309c;
class C0705a implements j0 {
C0705a() {
}
@Override
public void a(String str, Exception exc) {
if (str != null) {
u2 u2Var = x2.this.f26304d;
a aVar = a.this;
u2Var.b(aVar.f26309c, x2.this.f26301a.e(), a.this.f26307a);
x2.this.f26302b.v("three-d-secure.cardinal-sdk.init.setup-completed");
return;
}
u2 u2Var2 = x2.this.f26304d;
a aVar2 = a.this;
u2Var2.b(aVar2.f26309c, x2.this.f26301a.e(), a.this.f26307a);
x2.this.f26302b.v("three-d-secure.cardinal-sdk.init.setup-failed");
}
}
a(e3 e3Var, FragmentActivity fragmentActivity, c3 c3Var) {
this.f26307a = e3Var;
this.f26308b = fragmentActivity;
this.f26309c = c3Var;
}
@Override
public void a(q0 q0Var, Exception exc) {
if (q0Var == null) {
this.f26307a.a(null, exc);
return;
}
if (!q0Var.r()) {
this.f26307a.a(null, new BraintreeException("Three D Secure is not enabled for this account. Please contact Braintree Support for assistance."));
return;
}
if (!x2.this.f26302b.e(this.f26308b, 13487)) {
x2.this.f26302b.v("three-d-secure.invalid-manifest");
this.f26307a.a(null, new BraintreeException("AndroidManifest.xml is incorrectly configured or another app defines the same browser switch url as this app. See https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/android/v4#browser-switch-setup for the correct configuration"));
} else {
if (q0Var.d() == null && "2".equals(this.f26309c.k())) {
this.f26307a.a(null, new BraintreeException("Merchant is not configured for 3DS 2.0. Please contact Braintree Support for assistance."));
return;
}
x2.this.f26302b.v("three-d-secure.initialized");
if ("1".equals(this.f26309c.k())) {
x2.this.f26304d.b(this.f26309c, x2.this.f26301a.e(), this.f26307a);
} else {
x2.this.f26301a.f(this.f26308b, q0Var, this.f26309c, new C0705a());
}
}
}
}
class b implements e3 {
b() {
}
@Override
public void a(d3 d3Var, Exception exc) {
if (d3Var != null) {
if (d3Var.d()) {
x2.this.f26302b.v("three-d-secure.verification-flow.upgrade-payment-method.failure.returned-lookup-nonce");
} else {
x2.this.f26302b.v("three-d-secure.verification-flow.upgrade-payment-method.succeeded");
x2.this.q(d3Var);
}
x2.d(x2.this);
throw null;
}
if (exc == null) {
return;
}
x2.this.f26302b.v("three-d-secure.verification-flow.upgrade-payment-method.errored");
x2.d(x2.this);
throw null;
}
}
static class c {
static final int[] f26313a;
static {
int[] iArr = new int[v8.a.values().length];
f26313a = iArr;
try {
iArr[v8.a.FAILURE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
f26313a[v8.a.SUCCESS.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
f26313a[v8.a.NOACTION.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
f26313a[v8.a.ERROR.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
f26313a[v8.a.TIMEOUT.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
f26313a[v8.a.CANCEL.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
}
}
class d implements s0 {
final FragmentActivity f26314a;
final c3 f26315b;
final d3 f26316c;
final e3 f26317d;
d(FragmentActivity fragmentActivity, c3 c3Var, d3 d3Var, e3 e3Var) {
this.f26314a = fragmentActivity;
this.f26315b = c3Var;
this.f26316c = d3Var;
this.f26317d = e3Var;
}
@Override
public void a(q0 q0Var, Exception exc) {
x2.this.r(this.f26314a, q0Var, this.f26315b, this.f26316c, this.f26317d);
}
}
class e implements e3 {
final e3 f26319a;
e(e3 e3Var) {
this.f26319a = e3Var;
}
@Override
public void a(d3 d3Var, Exception exc) {
if (d3Var != null) {
if (d3Var.d()) {
x2.this.f26302b.v("three-d-secure.verification-flow.upgrade-payment-method.failure.returned-lookup-nonce");
} else {
x2.this.f26302b.v("three-d-secure.verification-flow.upgrade-payment-method.succeeded");
x2.this.q(d3Var);
}
} else if (exc != null) {
x2.this.f26302b.v("three-d-secure.verification-flow.upgrade-payment-method.errored");
}
this.f26319a.a(d3Var, exc);
}
}
@Deprecated
public x2(@NonNull p pVar) {
this(null, null, pVar, new i0(), new f3(), new u2(pVar));
}
static z2 d(x2 x2Var) {
x2Var.getClass();
return null;
}
public void q(d3 d3Var) {
y2 h15 = d3Var.c().h();
this.f26302b.v(String.format("three-d-secure.verification-flow.liability-shifted.%b", Boolean.valueOf(h15.c())));
this.f26302b.v(String.format("three-d-secure.verification-flow.liability-shift-possible.%b", Boolean.valueOf(h15.b())));
}
public void r(FragmentActivity fragmentActivity, q0 q0Var, c3 c3Var, d3 d3Var, e3 e3Var) {
boolean z15;
a3 b15 = d3Var.b();
if (b15.b() != null) {
z15 = true;
} else {
z15 = false;
}
String f15 = b15.f();
this.f26302b.v(String.format("three-d-secure.verification-flow.challenge-presented.%b", Boolean.valueOf(z15)));
this.f26302b.v(String.format("three-d-secure.verification-flow.3ds-version.%s", f15));
if (!z15) {
y2 h15 = d3Var.c().h();
this.f26302b.v(String.format("three-d-secure.verification-flow.liability-shifted.%b", Boolean.valueOf(h15.c())));
this.f26302b.v(String.format("three-d-secure.verification-flow.liability-shift-possible.%b", Boolean.valueOf(h15.b())));
e3Var.a(d3Var, null);
return;
}
if (!f15.startsWith("2.")) {
try {
this.f26302b.z(fragmentActivity, new z().g(13487).h(this.f26302b.q()).f(this.f26302b.t()).i(Uri.parse(this.f26303c.a(this.f26302b.q(), q0Var.c(), c3Var, b15))));
return;
} catch (BrowserSwitchException e15) {
e3Var.a(null, e15);
return;
}
}
this.f26302b.v("three-d-secure.verification-flow.started");
ThreeDSecureLifecycleObserver threeDSecureLifecycleObserver = this.f26306f;
if (threeDSecureLifecycleObserver != null) {
threeDSecureLifecycleObserver.a(d3Var);
return;
}
Bundle bundle = new Bundle();
bundle.putParcelable("com.braintreepayments.api.ThreeDSecureActivity.EXTRA_THREE_D_SECURE_RESULT", d3Var);
Intent intent = new Intent(fragmentActivity, (Class<?>) ThreeDSecureActivity.class);
intent.putExtras(bundle);
fragmentActivity.startActivityForResult(intent, 13487);
}
void g(@NonNull FragmentActivity fragmentActivity, @NonNull AbstractC4865k abstractC4865k) {
ThreeDSecureLifecycleObserver threeDSecureLifecycleObserver = new ThreeDSecureLifecycleObserver(fragmentActivity.getActivityResultRegistry(), this);
this.f26306f = threeDSecureLifecycleObserver;
abstractC4865k.a(threeDSecureLifecycleObserver);
}
@Deprecated
public void h(@NonNull FragmentActivity fragmentActivity, @NonNull c3 c3Var, @NonNull d3 d3Var, @NonNull e3 e3Var) {
this.f26302b.n(new d(fragmentActivity, c3Var, d3Var, e3Var));
}
public c0 i(FragmentActivity fragmentActivity) {
return this.f26302b.i(fragmentActivity);
}
public c0 j(FragmentActivity fragmentActivity) {
return this.f26302b.j(fragmentActivity);
}
public c0 k(FragmentActivity fragmentActivity) {
return this.f26302b.l(fragmentActivity);
}
public c0 l(FragmentActivity fragmentActivity) {
return this.f26302b.m(fragmentActivity);
}
@Deprecated
public void m(int i15, Intent intent, @NonNull e3 e3Var) {
if (i15 != -1) {
e3Var.a(null, new UserCanceledException("User canceled 3DS."));
return;
}
d3 d3Var = (d3) intent.getParcelableExtra("com.braintreepayments.api.ThreeDSecureActivity.EXTRA_THREE_D_SECURE_RESULT");
v8.d dVar = (v8.d) intent.getSerializableExtra("com.braintreepayments.api.ThreeDSecureActivity.EXTRA_VALIDATION_RESPONSE");
String stringExtra = intent.getStringExtra("com.braintreepayments.api.ThreeDSecureActivity.EXTRA_JWT");
this.f26302b.v(String.format("three-d-secure.verification-flow.cardinal-sdk.action-code.%s", dVar.a().name().toLowerCase()));
switch (c.f26313a[dVar.a().ordinal()]) {
case 1:
case 2:
case 3:
this.f26304d.a(d3Var, stringExtra, new e(e3Var));
this.f26302b.v("three-d-secure.verification-flow.completed");
return;
case 4:
case 5:
e3Var.a(null, new BraintreeException(dVar.b()));
this.f26302b.v("three-d-secure.verification-flow.failed");
return;
case 6:
e3Var.a(null, new UserCanceledException("User canceled 3DS.", true));
this.f26302b.v("three-d-secure.verification-flow.canceled");
return;
default:
return;
}
}
public void n(@NonNull c0 c0Var) {
this.f26305e = c0Var;
}
public void o(k0 k0Var) {
k0Var.a();
d3 c15 = k0Var.c();
v8.d d15 = k0Var.d();
String b15 = k0Var.b();
this.f26302b.v(String.format("three-d-secure.verification-flow.cardinal-sdk.action-code.%s", d15.a().name().toLowerCase()));
switch (c.f26313a[d15.a().ordinal()]) {
case 1:
case 2:
case 3:
this.f26304d.a(c15, b15, new b());
this.f26302b.v("three-d-secure.verification-flow.completed");
return;
case 4:
case 5:
new BraintreeException(d15.b());
throw null;
case 6:
new UserCanceledException("User canceled 3DS.", true);
throw null;
default:
return;
}
}
public void p(@NonNull FragmentActivity fragmentActivity, @NonNull c3 c3Var, @NonNull e3 e3Var) {
if (c3Var.c() != null && c3Var.g() != null) {
this.f26302b.n(new a(e3Var, fragmentActivity, c3Var));
} else {
e3Var.a(null, new InvalidArgumentException("The ThreeDSecureRequest nonce and amount cannot be null"));
}
}
x2(FragmentActivity fragmentActivity, AbstractC4865k abstractC4865k, p pVar, i0 i0Var, f3 f3Var, u2 u2Var) {
this.f26301a = i0Var;
this.f26302b = pVar;
this.f26303c = f3Var;
this.f26304d = u2Var;
if (fragmentActivity == null || abstractC4865k == null) {
return;
}
g(fragmentActivity, abstractC4865k);
}
}