正在查看: Empower MX v1.29.4.340 应用的 GooglePayPaymentMethodLauncherActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Empower MX v1.29.4.340 应用的 GooglePayPaymentMethodLauncherActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.stripe.android.googlepaylauncher;
import Gf.M;
import Gf.s;
import Rf.J;
import Rf.N;
import Rf.d0;
import Uf.InterfaceC0814f;
import Uf.O;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.ComponentActivity;
import androidx.lifecycle.e0;
import androidx.lifecycle.f0;
import androidx.lifecycle.g0;
import androidx.lifecycle.y;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.tasks.Task;
import com.stripe.android.googlepaylauncher.GooglePayPaymentMethodLauncherActivity;
import com.stripe.android.googlepaylauncher.k;
import com.stripe.android.googlepaylauncher.l;
import com.stripe.android.googlepaylauncher.m;
import i9.InterfaceC1721h;
import kotlin.KotlinNothingValueException;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.P;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import sf.s;
import sf.t;
import sf.x;
import z4.C3120i;
@Metadata(d1 = {"\u0000N\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0000\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u001d\u0010\b\u001a\u00020\u00072\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004H\u0002¢\u0006\u0004\b\b\u0010\tJ\u0017\u0010\u000b\u001a\u00020\u00072\u0006\u0010\n\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u000b\u0010\fJ\u0017\u0010\u000f\u001a\u00020\u00072\u0006\u0010\u000e\u001a\u00020\rH\u0002¢\u0006\u0004\b\u000f\u0010\u0010J\u0017\u0010\u0011\u001a\u00020\u00072\u0006\u0010\u000e\u001a\u00020\rH\u0002¢\u0006\u0004\b\u0011\u0010\u0010J\u000f\u0010\u0012\u001a\u00020\u0007H\u0002¢\u0006\u0004\b\u0012\u0010\u0003J\u0017\u0010\u0015\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u0013H\u0002¢\u0006\u0004\b\u0015\u0010\u0016J\u0019\u0010\u0019\u001a\u00020\u00072\b\u0010\u0018\u001a\u0004\u0018\u00010\u0017H\u0014¢\u0006\u0004\b\u0019\u0010\u001aJ\u000f\u0010\u001b\u001a\u00020\u0007H\u0016¢\u0006\u0004\b\u001b\u0010\u0003R\u001b\u0010!\u001a\u00020\u001c8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u001d\u0010\u001e\u001a\u0004\b\u001f\u0010 R\u001b\u0010&\u001a\u00020\"8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b#\u0010\u001e\u001a\u0004\b$\u0010%R\u0016\u0010*\u001a\u00020'8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b(\u0010)¨\u0006+"}, d2 = {"Lcom/stripe/android/googlepaylauncher/GooglePayPaymentMethodLauncherActivity;", "Landroidx/appcompat/app/c;", "<init>", "()V", "LB4/a;", "Lz4/i;", "taskResult", "", "G1", "(LB4/a;)V", "paymentData", "H1", "(Lz4/i;)V", "Lcom/stripe/android/googlepaylauncher/k$f;", "result", "J1", "(Lcom/stripe/android/googlepaylauncher/k$f;)V", "B1", "I1", "", "googlePayStatusCode", "E1", "(I)I", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "(Landroid/os/Bundle;)V", "finish", "Lcom/stripe/android/googlepaylauncher/m;", "b0", "Lsf/l;", "D1", "()Lcom/stripe/android/googlepaylauncher/m;", "viewModel", "Li9/h;", "c0", "C1", "()Li9/h;", "errorReporter", "Lcom/stripe/android/googlepaylauncher/l$a;", "d0", "Lcom/stripe/android/googlepaylauncher/l$a;", "args", "payments-core_release"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class GooglePayPaymentMethodLauncherActivity extends androidx.appcompat.app.c {
private final sf.l viewModel = new e0(M.b(m.class), new e(this), new g(), new f(null, this));
private final sf.l errorReporter = sf.m.a(new a());
private l.a args;
static final class a extends s implements Function0 {
a() {
super(0);
}
public final InterfaceC1721h invoke() {
return InterfaceC1721h.a.b(InterfaceC1721h.a, GooglePayPaymentMethodLauncherActivity.this, null, 2, null);
}
}
static final class b extends kotlin.coroutines.jvm.internal.m implements Function2 {
int d;
static final class a implements InterfaceC0814f {
final GooglePayPaymentMethodLauncherActivity d;
a(GooglePayPaymentMethodLauncherActivity googlePayPaymentMethodLauncherActivity) {
this.d = googlePayPaymentMethodLauncherActivity;
}
@Override
public final Object a(k.f fVar, vf.b bVar) {
if (fVar != null) {
this.d.B1(fVar);
}
return Unit.a;
}
}
b(vf.b bVar) {
super(2, bVar);
}
public final vf.b create(Object obj, vf.b bVar) {
return GooglePayPaymentMethodLauncherActivity.this.new b(bVar);
}
public final Object invoke(N n, vf.b bVar) {
return create(n, bVar).invokeSuspend(Unit.a);
}
public final Object invokeSuspend(Object obj) {
Object f = wf.b.f();
int i = this.d;
if (i == 0) {
t.b(obj);
O j = GooglePayPaymentMethodLauncherActivity.this.D1().j();
a aVar = new a(GooglePayPaymentMethodLauncherActivity.this);
this.d = 1;
if (j.b(aVar, this) == f) {
return f;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
t.b(obj);
}
throw new KotlinNothingValueException();
}
}
static final class c extends kotlin.coroutines.jvm.internal.m implements Function2 {
int d;
private Object e;
final g.d v;
static final class a extends kotlin.coroutines.jvm.internal.m implements Function2 {
int d;
final GooglePayPaymentMethodLauncherActivity e;
a(GooglePayPaymentMethodLauncherActivity googlePayPaymentMethodLauncherActivity, vf.b bVar) {
super(2, bVar);
this.e = googlePayPaymentMethodLauncherActivity;
}
public final vf.b create(Object obj, vf.b bVar) {
return new a(this.e, bVar);
}
public final Object invoke(N n, vf.b bVar) {
return create(n, bVar).invokeSuspend(Unit.a);
}
public final Object invokeSuspend(Object obj) {
Object f = wf.b.f();
int i = this.d;
if (i == 0) {
t.b(obj);
m D1 = this.e.D1();
this.d = 1;
obj = D1.m(this);
if (obj == f) {
return f;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
t.b(obj);
}
return obj;
}
}
c(g.d dVar, vf.b bVar) {
super(2, bVar);
this.v = dVar;
}
public final vf.b create(Object obj, vf.b bVar) {
c cVar = GooglePayPaymentMethodLauncherActivity.this.new c(this.v, bVar);
cVar.e = obj;
return cVar;
}
public final Object invoke(N n, vf.b bVar) {
return create(n, bVar).invokeSuspend(Unit.a);
}
public final Object invokeSuspend(Object obj) {
Object b;
Object f = wf.b.f();
int i = this.d;
try {
if (i == 0) {
t.b(obj);
GooglePayPaymentMethodLauncherActivity googlePayPaymentMethodLauncherActivity = GooglePayPaymentMethodLauncherActivity.this;
s.a aVar = sf.s.e;
J b2 = d0.b();
a aVar2 = new a(googlePayPaymentMethodLauncherActivity, null);
this.d = 1;
obj = Rf.i.g(b2, aVar2, this);
if (obj == f) {
return f;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
t.b(obj);
}
b = sf.s.b((Task) obj);
} catch (Throwable th) {
s.a aVar3 = sf.s.e;
b = sf.s.b(t.a(th));
}
g.d dVar = this.v;
GooglePayPaymentMethodLauncherActivity googlePayPaymentMethodLauncherActivity2 = GooglePayPaymentMethodLauncherActivity.this;
Throwable e = sf.s.e(b);
if (e == null) {
dVar.b((Task) b);
googlePayPaymentMethodLauncherActivity2.D1().n(true);
} else {
googlePayPaymentMethodLauncherActivity2.J1(new k.f.c(e, 1));
}
return Unit.a;
}
}
static final class d extends kotlin.coroutines.jvm.internal.m implements Function2 {
Object d;
int e;
final C3120i v;
d(C3120i c3120i, vf.b bVar) {
super(2, bVar);
this.v = c3120i;
}
public final vf.b create(Object obj, vf.b bVar) {
return GooglePayPaymentMethodLauncherActivity.this.new d(this.v, bVar);
}
public final Object invoke(N n, vf.b bVar) {
return create(n, bVar).invokeSuspend(Unit.a);
}
public final Object invokeSuspend(Object obj) {
GooglePayPaymentMethodLauncherActivity googlePayPaymentMethodLauncherActivity;
Object f = wf.b.f();
int i = this.e;
if (i == 0) {
t.b(obj);
GooglePayPaymentMethodLauncherActivity googlePayPaymentMethodLauncherActivity2 = GooglePayPaymentMethodLauncherActivity.this;
m D1 = googlePayPaymentMethodLauncherActivity2.D1();
C3120i c3120i = this.v;
this.d = googlePayPaymentMethodLauncherActivity2;
this.e = 1;
Object h = D1.h(c3120i, this);
if (h == f) {
return f;
}
googlePayPaymentMethodLauncherActivity = googlePayPaymentMethodLauncherActivity2;
obj = h;
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
googlePayPaymentMethodLauncherActivity = (GooglePayPaymentMethodLauncherActivity) this.d;
t.b(obj);
}
googlePayPaymentMethodLauncherActivity.B1((k.f) obj);
return Unit.a;
}
}
public static final class e extends Gf.s implements Function0 {
final ComponentActivity d;
public e(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final g0 invoke() {
return this.d.H();
}
}
public static final class f extends Gf.s implements Function0 {
final Function0 d;
final ComponentActivity e;
public f(Function0 function0, ComponentActivity componentActivity) {
super(0);
this.d = function0;
this.e = componentActivity;
}
public final n2.a invoke() {
n2.a aVar;
Function0 function0 = this.d;
return (function0 == null || (aVar = (n2.a) function0.invoke()) == null) ? this.e.A() : aVar;
}
}
static final class g extends Gf.s implements Function0 {
g() {
super(0);
}
public final f0.c invoke() {
l.a aVar = GooglePayPaymentMethodLauncherActivity.this.args;
if (aVar == null) {
Intrinsics.x("args");
aVar = null;
}
return new m.b(aVar);
}
}
public final void B1(k.f result) {
setResult(-1, new Intent().putExtras(androidx.core.os.c.a(new Pair[]{x.a("extra_result", result)})));
finish();
}
private final InterfaceC1721h C1() {
return (InterfaceC1721h) this.errorReporter.getValue();
}
public final m D1() {
return (m) this.viewModel.getValue();
}
private final int E1(int googlePayStatusCode) {
if (googlePayStatusCode != 7) {
return googlePayStatusCode != 10 ? 1 : 2;
}
return 3;
}
public static final void F1(GooglePayPaymentMethodLauncherActivity googlePayPaymentMethodLauncherActivity, B4.a aVar) {
Intrinsics.checkNotNullParameter(googlePayPaymentMethodLauncherActivity, "this$0");
Intrinsics.f(aVar);
googlePayPaymentMethodLauncherActivity.G1(aVar);
}
private final void G1(B4.a taskResult) {
int f2 = taskResult.b().f();
if (f2 == 0) {
C3120i c3120i = (C3120i) taskResult.a();
if (c3120i != null) {
H1(c3120i);
return;
} else {
InterfaceC1721h.b.a(C1(), InterfaceC1721h.f.H, null, null, 6, null);
J1(new k.f.c(new RuntimeException("Google Pay failed with missing data."), 1));
return;
}
}
if (f2 == 16) {
J1(k.f.a.d);
return;
}
Status b2 = taskResult.b();
Intrinsics.checkNotNullExpressionValue(b2, "getStatus(...)");
String r = b2.r();
if (r == null) {
r = "";
}
InterfaceC1721h.b.a(C1(), InterfaceC1721h.d.P, null, P.l(new Pair[]{x.a("status_message", r), x.a("status_code", String.valueOf(b2.f()))}), 2, null);
m D1 = D1();
int f3 = b2.f();
String r2 = b2.r();
D1.o(new k.f.c(new RuntimeException("Google Pay failed with error " + f3 + ": " + (r2 != null ? r2 : "")), E1(b2.f())));
}
private final void H1(C3120i paymentData) {
Rf.i.d(y.a(this), (CoroutineContext) null, (Rf.P) null, new d(paymentData, null), 3, (Object) null);
}
private final void I1() {
ra.c.a(this);
}
public final void J1(k.f result) {
D1().o(result);
}
public void finish() {
super/*android.app.Activity*/.finish();
I1();
}
protected void onCreate(Bundle savedInstanceState) {
super/*androidx.fragment.app.i*/.onCreate(savedInstanceState);
I1();
l.a.C0313a c0313a = l.a.F;
Intent intent = getIntent();
Intrinsics.checkNotNullExpressionValue(intent, "getIntent(...)");
l.a a2 = c0313a.a(intent);
if (a2 == null) {
B1(new k.f.c(new RuntimeException("GooglePayPaymentMethodLauncherActivity was started without arguments."), 2));
return;
}
this.args = a2;
Rf.i.d(y.a(this), (CoroutineContext) null, (Rf.P) null, new b(null), 3, (Object) null);
g.d g2 = g(new B4.c(), new g.b() {
public final void a(Object obj) {
GooglePayPaymentMethodLauncherActivity.F1(GooglePayPaymentMethodLauncherActivity.this, (B4.a) obj);
}
});
Intrinsics.checkNotNullExpressionValue(g2, "registerForActivityResult(...)");
if (D1().k()) {
return;
}
Rf.i.d(y.a(this), (CoroutineContext) null, (Rf.P) null, new c(g2, null), 3, (Object) null);
}
}