正在查看: RummyCircle v11000.89 应用的 TransactionActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: RummyCircle v11000.89 应用的 TransactionActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.phonepe.intent.sdk.ui;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcelable;
import android.webkit.ConsoleMessage;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.app.AlertController;
import androidx.appcompat.app.c;
import androidx.appcompat.widget.b0;
import androidx.camera.camera2.internal.o;
import chmha.a;
import chmha.f;
import com.phonepe.intent.sdk.bridges.BridgeHandler;
import java.util.Map;
import kotlin.Pair;
import kotlin.collections.I;
import kotlin.jvm.internal.Intrinsics;
import oohtx.chmha;
import uauho.h;
import uauho.l;
import wlgrx.n;
import wlgrx.s;
public class TransactionActivity extends chmha implements zihjx.a {
public static final int k = 0;
public zihjx.c j;
public class a extends WebViewClient {
public a() {
}
@Override
public final void onPageFinished(WebView webView, String str) {
zihjx.c cVar = TransactionActivity.this.j;
if (cVar == null || str == null) {
return;
}
cVar.e(str);
}
@Override
public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
zihjx.c cVar = TransactionActivity.this.j;
if (cVar == null || str == null) {
return;
}
cVar.c(str);
}
}
public class b extends WebChromeClient {
public b() {
}
@Override
public final boolean onConsoleMessage(ConsoleMessage consoleMessage) {
int i = c.a[consoleMessage.messageLevel().ordinal()];
if (i == 1) {
String message = consoleMessage.message();
Integer valueOf = Integer.valueOf(consoleMessage.lineNumber());
String sourceId = consoleMessage.sourceId();
Intrinsics.checkNotNullParameter("WebViewConsole", "tag");
jmjou.a.a.a("WebViewConsole", message, valueOf, sourceId);
return false;
}
if (i == 2) {
String message2 = consoleMessage.message();
Integer valueOf2 = Integer.valueOf(consoleMessage.lineNumber());
String sourceId2 = consoleMessage.sourceId();
Intrinsics.checkNotNullParameter("WebViewConsole", "tag");
jmjou.a.a.h("WebViewConsole", message2, valueOf2, sourceId2);
return false;
}
if (i == 3) {
String message3 = consoleMessage.message();
Integer valueOf3 = Integer.valueOf(consoleMessage.lineNumber());
String sourceId3 = consoleMessage.sourceId();
Intrinsics.checkNotNullParameter("WebViewConsole", "tag");
jmjou.a.a.g("WebViewConsole", message3, valueOf3, sourceId3);
return false;
}
if (i == 4) {
String message4 = consoleMessage.message();
Integer valueOf4 = Integer.valueOf(consoleMessage.lineNumber());
String sourceId4 = consoleMessage.sourceId();
Intrinsics.checkNotNullParameter("WebViewConsole", "tag");
jmjou.a.a.d("WebViewConsole", message4, valueOf4, sourceId4);
return false;
}
if (i != 5) {
return false;
}
String message5 = consoleMessage.message();
Integer valueOf5 = Integer.valueOf(consoleMessage.lineNumber());
String sourceId5 = consoleMessage.sourceId();
Intrinsics.checkNotNullParameter("WebViewConsole", "tag");
jmjou.a.a.f("WebViewConsole", message5, valueOf5, sourceId5);
return false;
}
@Override
public final void onProgressChanged(WebView webView, int i) {
TransactionActivity transactionActivity = TransactionActivity.this;
if ("card".matches(((chmha) transactionActivity).g)) {
if (i < 95) {
WebView webView2 = ((chmha) transactionActivity).c;
if (webView2 == null || webView2.getVisibility() != 0) {
return;
}
jmjou.a.c("WEB_VIEW_FAIL", "hidding webview");
((chmha) transactionActivity).c.setVisibility(4);
return;
}
WebView webView3 = ((chmha) transactionActivity).c;
if (webView3 == null || webView3.getVisibility() == 0) {
return;
}
jmjou.a.c("WEB_VIEW_FAIL", "showing webview");
((chmha) transactionActivity).c.setVisibility(0);
transactionActivity.z();
}
}
}
public static class c {
public static final int[] a;
static {
int[] iArr = new int[ConsoleMessage.MessageLevel.values().length];
a = iArr;
try {
iArr[ConsoleMessage.MessageLevel.LOG.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[ConsoleMessage.MessageLevel.ERROR.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[ConsoleMessage.MessageLevel.DEBUG.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[ConsoleMessage.MessageLevel.WARNING.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[ConsoleMessage.MessageLevel.TIP.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
}
}
public final void A() {
Intrinsics.checkNotNullParameter("TransactionActivity", "tag");
Intrinsics.checkNotNullParameter("initializing web views..", BridgeHandler.MESSAGE);
jmjou.a.b("TransactionActivity", "initializing web views..");
((chmha) this).c.setWebViewClient(new a());
((chmha) this).c.setWebChromeClient(new b());
super.A();
Intrinsics.checkNotNullParameter("TransactionActivity", "tag");
Intrinsics.checkNotNullParameter("web views initialized", BridgeHandler.MESSAGE);
jmjou.a.b("TransactionActivity", "web views initialized");
}
public final void B(String str, boolean z) {
Intent intent = new Intent();
intent.putExtra("key_txn_result", str);
if (z) {
setResult(0, intent);
} else {
setResult(-1, intent);
}
Boolean valueOf = Boolean.valueOf(z);
Pair[] pairArr = new Pair[2];
if (str == null) {
str = "";
}
pairArr[0] = new Pair("response", str);
pairArr[1] = new Pair("isCancelled", String.valueOf(valueOf != null ? valueOf.booleanValue() : false));
Map f = I.f(pairArr);
Intrinsics.checkNotNullParameter("DEBIT_MERCHANT_RESULT_SENT", "eventName");
try {
chmha.c c2 = f.c().c(chmha.c.class);
n e = c2.e("DEBIT_MERCHANT_RESULT_SENT");
for (Map.Entry entry : f.entrySet()) {
e.b(entry.getValue(), (String) entry.getKey());
}
c2.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);
}
finish();
}
public final void a(String str, String str2, String str3) {
this.j.a(str, str2, str3);
}
public final void b() {
Intrinsics.checkNotNullParameter("DEBIT_CANCEL_DIALOG_SHOWN", "eventName");
try {
chmha.c c2 = f.c().c(chmha.c.class);
c2.a(c2.e("DEBIT_CANCEL_DIALOG_SHOWN"));
} catch (Exception e) {
Intrinsics.checkNotNullParameter("EventDebug", "tag");
Intrinsics.checkNotNullParameter("error in send event", BridgeHandler.MESSAGE);
jmjou.a.a.c("EventDebug", "error in send event", e);
}
c.a aVar = new c.a(this);
String string = getString(com.phonepe.intent.sdk.d.cancel_confirmation);
AlertController.b bVar = aVar.a;
bVar.f = string;
bVar.k = false;
String string2 = getString(com.phonepe.intent.sdk.d.ok);
DialogInterface.OnClickListener onClickListener = new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
TransactionActivity.this.j.k();
}
};
bVar.g = string2;
bVar.h = onClickListener;
String string3 = getString(com.phonepe.intent.sdk.d.cancel);
DialogInterface.OnClickListener onClickListener2 = new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
TransactionActivity.this.j.b();
dialogInterface.cancel();
}
};
bVar.i = string3;
bVar.j = onClickListener2;
androidx.appcompat.app.c create = aVar.create();
if (isDestroyed() || isFinishing()) {
l.a(l.a.b, 0);
return;
}
create.show();
create.getButton(-2).setTextColor(getResources().getColor(com.phonepe.intent.sdk.a.colorText));
create.getButton(-1).setTextColor(getResources().getColor(com.phonepe.intent.sdk.a.colorText));
}
public final void c(String str) {
((chmha) this).d.getClass();
String packageName = chmha.a.a.getPackageName();
Pair[] pairArr = new Pair[2];
pairArr[0] = new Pair("url", str == null ? "" : str);
if (packageName == null) {
packageName = "";
}
pairArr[1] = new Pair("merchantAppId", packageName);
Map f = I.f(pairArr);
Intrinsics.checkNotNullParameter("DEBIT_OPEN_URL_IN_WEB", "eventName");
try {
chmha.c c2 = f.c().c(chmha.c.class);
n e = c2.e("DEBIT_OPEN_URL_IN_WEB");
for (Map.Entry entry : f.entrySet()) {
e.b(entry.getValue(), (String) entry.getKey());
}
c2.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);
}
((chmha) this).c.getSettings().setCacheMode(-1);
((chmha) this).c.loadUrl(str);
}
public final void d(String str) {
B(str, false);
}
public final void e(String str) {
B(str, true);
}
public final void f(String str, String str2, String str3) {
this.j.f(str, str2, str3);
}
public final void g(String str) {
zihjx.c cVar = this.j;
if (cVar != null) {
cVar.g(str);
}
}
public final void i(boolean z) {
if (z) {
runOnUiThread(new o(this, 11));
} else {
z();
}
}
public final void j(Uri uri) {
((chmha) this).d.getClass();
String packageName = chmha.a.a.getPackageName();
Pair[] pairArr = new Pair[2];
String uri2 = uri == null ? null : uri.toString();
if (uri2 == null) {
uri2 = "";
}
pairArr[0] = new Pair("uri", uri2);
pairArr[1] = new Pair("merchantAppId", String.valueOf(packageName));
Map f = I.f(pairArr);
Intrinsics.checkNotNullParameter("DEBIT_OPEN_PHONE_PE_APP", "eventName");
try {
chmha.c c2 = f.c().c(chmha.c.class);
n e = c2.e("DEBIT_OPEN_PHONE_PE_APP");
for (Map.Entry entry : f.entrySet()) {
e.b(entry.getValue(), (String) entry.getKey());
}
c2.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);
}
String format = String.format("request activity start for result for uri = {%s}.", uri);
Intrinsics.checkNotNullParameter("TransactionActivity", "tag");
Intrinsics.checkNotNullParameter(format, BridgeHandler.MESSAGE);
jmjou.a.b("TransactionActivity", format);
Intent intent = new Intent("android.intent.action.VIEW", uri);
f fVar = f.a;
if (f.a(((chmha) this).d)) {
chmha.a aVar = ((chmha) this).d;
Intrinsics.checkNotNullParameter(aVar, "objectFactory");
aVar.getClass();
Boolean bool = (Boolean) chmha.a.e("com.phonepe.android.sdk.isSimulatorStage");
intent.setPackage((bool != null && bool.booleanValue()) ? "com.phonepe.simulator.debug" : "com.phonepe.simulator");
} else {
intent.setPackage(uauho.e.b(((chmha) this).d));
}
if (isFinishing()) {
l.a(l.a.c, 0);
return;
}
String format2 = String.format("starting activity for intent = {%s}.", intent.toString());
Intrinsics.checkNotNullParameter("TransactionActivity", "tag");
Intrinsics.checkNotNullParameter(format2, BridgeHandler.MESSAGE);
jmjou.a.b("TransactionActivity", format2);
runOnUiThread(new b0(this, 13));
if (intent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(intent, 725);
} else {
l.a(l.a.d, 0);
B("APP_NOT_INSTALLED", false);
}
}
public final void onActivityResult(int i, int i2, Intent intent) {
Object[] objArr = new Object[3];
objArr[0] = Integer.valueOf(i);
objArr[1] = Integer.valueOf(i2);
objArr[2] = intent == null ? "null" : intent.toString();
String format = String.format("activity result received. requestCode = {%s}, resultCode = {%s}, Intent = {%s}.", objArr);
Intrinsics.checkNotNullParameter("TransactionActivity", "tag");
Intrinsics.checkNotNullParameter(format, BridgeHandler.MESSAGE);
jmjou.a.b("TransactionActivity", format);
if (i != 725) {
super.onActivityResult(i, i2, intent);
return;
}
boolean z = i2 == 0;
s a2 = s.a(intent);
Pair[] pairArr = new Pair[2];
pairArr[0] = new Pair("isCancelled", String.valueOf(z));
String sVar = a2 == null ? null : a2.toString();
if (sVar == null) {
sVar = "";
}
pairArr[1] = new Pair("appResult", sVar);
Map f = I.f(pairArr);
Intrinsics.checkNotNullParameter("DEBIT_APP_RESULT", "eventName");
try {
chmha.c c2 = f.c().c(chmha.c.class);
n e = c2.e("DEBIT_APP_RESULT");
for (Map.Entry entry : f.entrySet()) {
e.b(entry.getValue(), (String) entry.getKey());
}
c2.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);
}
B(a2 != null ? a2.toString() : ((chmha) this).d.a("FAILED").toJsonString(), z);
}
public final void onBackPressed() {
Intrinsics.checkNotNullParameter("DEBIT_BACK_PRESSED", "eventName");
try {
chmha.c c2 = f.c().c(chmha.c.class);
c2.a(c2.e("DEBIT_BACK_PRESSED"));
} catch (Exception e) {
Intrinsics.checkNotNullParameter("EventDebug", "tag");
Intrinsics.checkNotNullParameter("error in send event", BridgeHandler.MESSAGE);
jmjou.a.a.c("EventDebug", "error in send event", e);
}
zihjx.c cVar = this.j;
if (cVar != null) {
cVar.j();
}
}
public final void onCreate(Bundle bundle) {
Parcelable parcelable;
getWindow().getAttributes().windowAnimations = com.phonepe.intent.sdk.e.FadeAnimation;
jmjou.a.c("TransactionActivity", "transaction activity creating...");
if (getIntent() == null || getIntent().getExtras() == null) {
if (bundle != null) {
parcelable = bundle.getParcelable("data_factory");
}
super.onCreate(bundle);
this.j.h(getIntent(), bundle);
jmjou.a.c("TransactionActivity", "transaction activity created.");
}
parcelable = getIntent().getParcelableExtra("data_factory");
chmha.a aVar = (chmha.a) parcelable;
a.a c2 = aVar.c(a.a.class);
c2.put("trxView", this);
c2.put("bridgeCallback", this);
this.j = aVar.d(zihjx.b.class, c2);
super.onCreate(bundle);
this.j.h(getIntent(), bundle);
jmjou.a.c("TransactionActivity", "transaction activity created.");
}
public final void onDestroy() {
super.onDestroy();
zihjx.c cVar = this.j;
if (cVar != null) {
cVar.l();
}
}
public final void onSaveInstanceState(Bundle bundle) {
super/*androidx.activity.ComponentActivity*/.onSaveInstanceState(bundle);
bundle.putParcelable("data_factory", ((chmha) this).d);
zihjx.c cVar = this.j;
if (cVar != null) {
cVar.n(bundle);
}
}
public final void r(String str, boolean z) {
((chmha) this).f.setVisibility(8);
((chmha) this).d.c(h.class).getClass();
String format = String.format(z ? "%s\nPlease try again." : "%s\nPlease try again.\n\nRedirecting back to %s.", str, uauho.e.d(((chmha) this).d, getPackageName()));
chmha.c cVar = ((chmha) this).e;
n e = cVar.e("SDK_ERROR_TO_USER");
e.b(format, "errorMessage");
cVar.a(e);
((chmha) this).d.c(h.class).getClass();
String format2 = String.format(z ? "%s\nPlease try again." : "%s\nPlease try again.\n\nRedirecting back to %s.", str, uauho.e.d(((chmha) this).d, getPackageName()));
c.a aVar = new c.a(this);
AlertController.b bVar = aVar.a;
bVar.f = format2;
bVar.k = false;
if (z) {
DialogInterface.OnClickListener onClickListener = new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
int i2 = TransactionActivity.k;
TransactionActivity transactionActivity = TransactionActivity.this;
transactionActivity.getClass();
dialogInterface.dismiss();
transactionActivity.j.i();
}
};
bVar.g = "Retry";
bVar.h = onClickListener;
DialogInterface.OnClickListener onClickListener2 = new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
int i2 = TransactionActivity.k;
TransactionActivity transactionActivity = TransactionActivity.this;
transactionActivity.getClass();
dialogInterface.dismiss();
transactionActivity.j.g("FAILED");
}
};
bVar.i = "Close";
bVar.j = onClickListener2;
}
androidx.appcompat.app.c create = aVar.create();
create.show();
create.getButton(-2).setTextColor(getResources().getColor(com.phonepe.intent.sdk.a.colorText));
create.getButton(-1).setTextColor(getResources().getColor(com.phonepe.intent.sdk.a.colorText));
}
}