正在查看: RummyCircle v11000.89 应用的 B2bPgActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: RummyCircle v11000.89 应用的 B2bPgActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.phonepe.intent.sdk.ui.b2bPg;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.camera.core.G;
import androidx.lifecycle.J;
import androidx.lifecycle.M;
import chmha.f;
import com.phonepe.intent.sdk.bridges.BridgeHandler;
import java.util.Map;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.I;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.o;
import lupsq.a;
import lupsq.b;
import lupsq.c;
import oohtx.b;
import oohtx.chmha;
import org.jetbrains.annotations.NotNull;
import wlgrx.n;
import wlgrx.s;
@Metadata
public final class B2bPgActivity extends chmha {
public static final int l = 0;
public boolean j;
public c k;
public static final class a extends WebViewClient {
@Override
public final boolean shouldOverrideUrlLoading(@NotNull WebView webView, @NotNull String str) {
Intrinsics.checkNotNullParameter(webView, "view");
Intrinsics.checkNotNullParameter(str, "url");
webView.loadUrl(str);
return true;
}
}
public final void A() {
((chmha) this).c.setWebViewClient(new a());
WebView webView = ((chmha) this).c;
if (getIntent().getParcelableExtra("data_factory") instanceof chmha.a) {
}
webView.setWebChromeClient(new xqafe.a());
super.A();
}
public final void B(Intent intent, int i) {
Intrinsics.checkNotNullParameter(intent, "intent");
Pair[] pairArr = new Pair[2];
pairArr[0] = new Pair("resultCode", String.valueOf(i));
Bundle extras = intent.getExtras();
String bundle = extras == null ? null : extras.toString();
if (bundle == null) {
bundle = "";
}
pairArr[1] = new Pair("intentExtras", bundle);
Map f = I.f(pairArr);
Intrinsics.checkNotNullParameter("B2B_PG_MERCHANT_RESULT_SENT", "eventName");
try {
chmha.c c = f.c().c(chmha.c.class);
n e = c.e("B2B_PG_MERCHANT_RESULT_SENT");
for (Map.Entry entry : f.entrySet()) {
e.b(entry.getValue(), (String) entry.getKey());
}
c.a(e);
} catch (Exception e2) {
Intrinsics.checkNotNullParameter("EventDebug", "tag");
Intrinsics.checkNotNullParameter("error in send event", BridgeHandler.MESSAGE);
jmjou.a.a.c("EventDebug", "error in send event", e2);
}
setResult(i, intent);
finish();
}
public final void C(String str, String str2) {
Intent intent = new Intent();
intent.putExtra("key_error_code", str);
if (str2 != null) {
intent.putExtra("key_error_result", str2);
}
B(intent, 0);
}
public final void g(java.lang.String r7) {
throw new UnsupportedOperationException("Method not decompiled: com.phonepe.intent.sdk.ui.b2bPg.B2bPgActivity.g(java.lang.String):void");
}
public final void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i == 725) {
c cVar = this.k;
String str = null;
if (cVar == null) {
Intrinsics.q("b2BPgBaseViewModel");
throw null;
}
boolean z = i2 == 0;
s a2 = s.a(intent);
wlgrx.f a3 = cVar.a.a("FAILED");
String sVar = a2 == null ? null : a2.toString();
if (sVar != null) {
str = sVar;
} else if (a3 != null) {
str = a3.toJsonString();
}
Map f = I.f(new Pair[]{new Pair("response", str), new Pair("isUserCancelled", Boolean.valueOf(z)), new Pair(BridgeHandler.TARGET_PACKAGE_NAME, cVar.c)});
Intrinsics.checkNotNullParameter("B2B_PG_UPI_APP_RETURNED_RESULT", "eventName");
try {
chmha.c c = f.c().c(chmha.c.class);
n e = c.e("B2B_PG_UPI_APP_RETURNED_RESULT");
for (Map.Entry entry : f.entrySet()) {
e.b(entry.getValue(), (String) entry.getKey());
}
c.a(e);
} catch (Exception e2) {
Intrinsics.checkNotNullParameter("EventDebug", "tag");
Intrinsics.checkNotNullParameter("error in send event", BridgeHandler.MESSAGE);
jmjou.a.a.c("EventDebug", "error in send event", e2);
}
cVar.f.n(new b.a(str, Boolean.valueOf(z)));
}
}
public final void onCreate(Bundle bundle) {
Unit unit;
String stringExtra;
int i;
c cVar;
super.onCreate(bundle);
Intent intent = getIntent();
if (intent == null || (stringExtra = intent.getStringExtra("KEY_B2B_PG_FLOW")) == null) {
unit = null;
} else {
jmjou.a.d("PgActivity", Intrinsics.j(stringExtra, "init pg vm of flow "));
if (stringExtra.equals("V1")) {
i = 1;
} else {
if (!stringExtra.equals("V2")) {
throw new IllegalArgumentException("No enum constant com.phonepe.intent.sdk.ui.b2bPg.models.enums.B2bPgFlow.".concat(stringExtra));
}
i = 2;
}
Bundle extras = getIntent().getExtras();
if (this.k == null) {
if (i == 0) {
throw null;
}
int i2 = i - 1;
if (i2 == 0) {
chmha.a aVar = ((chmha) this).d;
Intrinsics.checkNotNullExpressionValue(aVar, "objectFactory");
c a2 = new M(this, new b.a(aVar, extras)).a(lupsq.b.class);
Intrinsics.checkNotNullExpressionValue(a2, "ViewModelProvider(\n …gV1ViewModel::class.java]");
cVar = a2;
} else {
if (i2 != 1) {
throw new NoWhenBranchMatchedException();
}
chmha.a aVar2 = ((chmha) this).d;
Intrinsics.checkNotNullExpressionValue(aVar2, "objectFactory");
J a3 = new M(this, new a.b(aVar2, extras)).a(lupsq.a.class);
Intrinsics.checkNotNullExpressionValue(a3, "ViewModelProvider(\n …gV2ViewModel::class.java]");
cVar = (c) a3;
}
this.k = cVar;
}
unit = Unit.a;
}
if (unit == null) {
jmjou.a.e("PgActivity", "KEY_B2B_PG_FLOW key not found in intent extras");
C("ERROR_SDK_INTERNAL_ERROR_NO_PG_VM", null);
}
String stringExtra2 = getIntent().getStringExtra("B2B_PG_Response");
if (bundle != null) {
this.j = bundle.getBoolean("deeplink_launched", false);
stringExtra2 = bundle.getString("B2B_PG_Response", stringExtra2);
}
c cVar2 = this.k;
if (cVar2 == null) {
Intrinsics.q("b2BPgBaseViewModel");
throw null;
}
cVar2.e = stringExtra2;
if (stringExtra2 == null || o.i(stringExtra2)) {
jmjou.a.d("PgBaseVm", "starting PG API call");
cVar2.e();
} else {
jmjou.a.d("PgBaseVm", "PAY API response detected, not making API call");
cVar2.a(stringExtra2);
}
c cVar3 = this.k;
if (cVar3 != null) {
cVar3.f.h(this, new G(this, 8));
} else {
Intrinsics.q("b2BPgBaseViewModel");
throw null;
}
}
public final void onSaveInstanceState(@NotNull Bundle bundle) {
Intrinsics.checkNotNullParameter(bundle, "outState");
super/*androidx.activity.ComponentActivity*/.onSaveInstanceState(bundle);
bundle.putBoolean("deeplink_launched", this.j);
c cVar = this.k;
if (cVar == null) {
Intrinsics.q("b2BPgBaseViewModel");
throw null;
}
String str = cVar.e;
String str2 = true ^ (str == null || o.i(str)) ? str : null;
if (str2 == null) {
return;
}
bundle.putString("B2B_PG_Response", str2);
}
public final void a(String str, String str2, String str3) {
}
public final void f(String str, String str2, String str3) {
}
}