正在查看: Clash Legends v0.0.1 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.payu.custombrowser;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.IBinder;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.payu.custombrowser.a;
import com.payu.custombrowser.bean.CustomBrowserConfig;
import com.payu.custombrowser.services.SnoozeService;
import com.payu.custombrowser.util.SnoozeConfigMap;
import com.payu.custombrowser.widgets.SnoozeLoaderView;
import com.payu.otpparser.OtpCallback;
import com.payu.otpparser.OtpParser;
import com.payu.payuanalytics.analytics.model.PayUAnalytics;
import com.payu.payuanalytics.analytics.model.PayUDeviceAnalytics;
import in.juspay.godel.core.Constants;
import java.io.FileNotFoundException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Timer;
import javax.net.ssl.HttpsURLConnection;
import org.json.JSONException;
import org.json.JSONObject;
public abstract class b extends com.payu.custombrowser.a {
public static boolean hasToStart = false;
public static int snoozeImageDownloadTimeout;
private static boolean u0;
View Y;
boolean Z;
Intent a0;
boolean b0;
int c0;
String e0;
Timer f0;
boolean h0;
String i0;
boolean l0;
protected HashMap<String, String> mAnalyticsMap;
com.payu.custombrowser.custombar.a o0;
int[] p0;
SnoozeConfigMap q0;
protected CountDownTimer slowUserCountDownTimer;
protected AlertDialog slowUserWarningDialog;
protected BroadcastReceiver snoozeBroadCastReceiver;
protected SnoozeService snoozeService;
protected int snoozeUrlLoadingPercentage;
protected int snoozeUrlLoadingTimeout;
protected int snoozeVisibleCountBackwdJourney;
protected int snoozeVisibleCountFwdJourney;
protected String SNOOZE_GET_WEBVIEW_STATUS_INTENT_ACTION = "webview_status_action";
protected boolean isSnoozeBroadCastReceiverRegistered = false;
protected boolean isSnoozeServiceBounded = false;
protected int snoozeCount = 0;
protected int snoozeCountBackwardJourney = 0;
protected boolean isSnoozeEnabled = true;
protected boolean isRetryNowPressed = false;
protected boolean isListenerAttached = false;
protected ServiceConnection snoozeServiceConnection = new k();
boolean d0 = true;
Boolean g0 = Boolean.FALSE;
boolean j0 = true;
boolean k0 = false;
boolean m0 = false;
boolean n0 = false;
private String r0 = "snooze_broad_cast_message";
int s0 = 0;
int t0 = 0;
public boolean isS2SHtmlSupport = false;
class a implements DialogInterface.OnDismissListener {
a(b bVar) {
}
@Override
public void onDismiss(DialogInterface dialogInterface) {
}
}
class DialogInterfaceOnKeyListenerC0012b implements DialogInterface.OnKeyListener {
DialogInterfaceOnKeyListenerC0012b() {
}
@Override
public boolean onKey(DialogInterface dialogInterface, int i, KeyEvent keyEvent) {
if (i != 4 || keyEvent.getAction() != 0) {
return true;
}
b.this.slowUserWarningDialog.dismiss();
return true;
}
}
class c implements View.OnClickListener {
c() {
}
@Override
public void onClick(View view) {
b.this.slowUserWarningDialog.dismiss();
}
}
class d implements Runnable {
final Intent a;
d(Intent intent) {
this.a = intent;
}
@Override
public void run() {
androidx.appcompat.app.AlertDialog alertDialog = b.this.g;
if (alertDialog != null) {
alertDialog.dismiss();
b.this.showReviewOrderHorizontalBar();
}
b bVar = b.this;
if (bVar.backwardJourneyStarted) {
SnoozeService snoozeService = bVar.snoozeService;
if (snoozeService != null) {
snoozeService.d();
}
b.this.showTransactionStatusDialog(this.a.getStringExtra("value"), false);
return;
}
if (bVar.isRetryNowPressed) {
bVar.isRetryNowPressed = false;
} else {
bVar.snoozeCount++;
}
bVar.resumeTransaction(this.a);
}
}
class e implements DialogInterface.OnDismissListener {
final String a;
e(String str) {
this.a = str;
}
@Override
public void onDismiss(DialogInterface dialogInterface) {
try {
com.payu.custombrowser.bean.b bVar = com.payu.custombrowser.bean.b.SINGLETON;
if (bVar.getPayuCustomBrowserCallback() != null) {
bVar.getPayuCustomBrowserCallback().onPaymentSuccess(this.a, "");
}
} catch (Exception e) {
}
b.this.g.dismiss();
b.this.g.cancel();
b.this.b.finish();
}
}
class f implements Runnable {
f() {
}
@Override
public void run() {
androidx.appcompat.app.AlertDialog alertDialog = b.this.g;
if (alertDialog == null || !alertDialog.isShowing()) {
return;
}
b.this.g.cancel();
b.this.g.dismiss();
b.this.b.finish();
}
}
class g implements View.OnClickListener {
g() {
}
@Override
public void onClick(View view) {
b.this.a("snooze_interaction_time", "-1");
b.this.a("snooze_window_action", "snooze_cancel_transaction_click");
b.this.g.dismiss();
b.this.g.cancel();
b.this.b.finish();
}
}
class h implements DialogInterface.OnDismissListener {
h() {
}
@Override
public void onDismiss(DialogInterface dialogInterface) {
b.this.g.dismiss();
b.this.g.cancel();
}
}
class i implements Runnable {
i() {
}
@Override
public void run() {
androidx.appcompat.app.AlertDialog alertDialog = b.this.g;
if (alertDialog == null || !alertDialog.isShowing()) {
return;
}
b.this.g.cancel();
b.this.g.dismiss();
b.this.b.finish();
}
}
class j implements Runnable {
final String a;
final String b;
j(b bVar, String str, String str2) {
this.a = str;
this.b = str2;
}
@Override
public void run() {
try {
HttpsURLConnection httpsURLConnection = (HttpsURLConnection) new URL(URLDecoder.decode(this.a, "UTF-8")).openConnection();
String str = this.b;
httpsURLConnection.setRequestMethod("POST");
httpsURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
httpsURLConnection.setRequestProperty("Content-Length", String.valueOf(str.length()));
httpsURLConnection.setDoOutput(true);
httpsURLConnection.getOutputStream().write(str.getBytes());
} catch (Exception e) {
}
}
}
class k implements ServiceConnection {
k() {
}
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
b.this.snoozeService = ((SnoozeService.f) iBinder).a();
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
b.this.snoozeService = null;
}
}
class l extends BroadcastReceiver {
l() {
}
@Override
public void onReceive(Context context, Intent intent) {
Activity activity;
b bVar;
SnoozeService snoozeService;
if (context == null || (activity = b.this.b) == null || activity.isFinishing()) {
return;
}
if (intent.hasExtra("broadcaststatus")) {
Intent intent2 = new Intent(context.getApplicationContext(), (Class<?>) CBActivity.class);
intent2.putExtra(com.payu.custombrowser.util.b.SENDER, com.payu.custombrowser.util.b.SNOOZE_SERVICE);
intent2.putExtra(com.payu.custombrowser.util.b.VERIFICATION_MSG_RECEIVED, true);
intent2.putExtra("payu_response", intent.getExtras().getString("payu_response"));
intent2.setFlags(805306368);
context.startActivity(intent2);
}
if (intent.hasExtra(b.this.r0) && (snoozeService = (bVar = b.this).snoozeService) != null) {
snoozeService.c(intent.getStringExtra(bVar.r0));
}
if (intent.getBooleanExtra("BROAD_CAST_FROM_SNOOZE_SERVICE", false)) {
b.this.a(intent.getStringExtra("event_key"), intent.getStringExtra("event_value"));
}
if (intent.hasExtra(com.payu.custombrowser.util.b.SNOOZE_SERVICE_STATUS)) {
b bVar2 = b.this;
bVar2.Z = true;
int i = CBActivity.g;
bVar2.p();
}
if (intent.getBooleanExtra(com.payu.custombrowser.util.b.BROADCAST_FROM_SERVICE_UPDATE_UI, false) && intent.hasExtra(com.payu.custombrowser.util.b.IS_FORWARD_JOURNEY)) {
if (intent.getStringExtra("key").contentEquals(com.payu.custombrowser.util.b.GOOD_NETWORK_NOTIFICATION_LAUNCHED)) {
b bVar3 = b.this;
bVar3.Z = true;
bVar3.a0 = intent;
} else {
b bVar4 = b.this;
bVar4.Z = false;
bVar4.a(intent);
}
}
}
}
class m implements View.OnClickListener {
m() {
}
@Override
public void onClick(View view) {
b.this.b.finish();
}
}
class n implements DialogInterface.OnCancelListener {
n() {
}
@Override
public void onCancel(DialogInterface dialogInterface) {
b.this.b.finish();
}
}
class o implements View.OnTouchListener {
o() {
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
b.this.k();
View view2 = b.this.G;
if (view2 != null) {
view2.setVisibility(8);
}
b bVar = b.this;
if (bVar.u != 2) {
return false;
}
bVar.h();
return false;
}
}
class p implements View.OnKeyListener {
class a implements DialogInterface.OnClickListener {
a() {
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
b.this.postToPaytxn();
b.this.a("user_input", "back_button_ok");
dialogInterface.dismiss();
b.this.onBackApproved();
b.this.b.finish();
}
}
class DialogInterfaceOnClickListenerC0013b implements DialogInterface.OnClickListener {
DialogInterfaceOnClickListenerC0013b() {
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
b.this.a("user_input", "back_button_cancel");
b.this.onBackCancelled();
dialogInterface.dismiss();
}
}
p() {
}
@Override
public boolean onKey(View view, int i, KeyEvent keyEvent) {
if (keyEvent.getAction() == 1 && i == 4) {
if (b.this.getArguments().getBoolean(com.payu.custombrowser.util.b.BACK_BUTTON, true)) {
AlertDialog.Builder builder = new AlertDialog.Builder(b.this.b, R.style.cb_dialog);
builder.setCancelable(false);
builder.setMessage("Do you really want to cancel the transaction ?");
builder.setPositiveButton("Ok", new a());
builder.setNegativeButton("Cancel", new DialogInterfaceOnClickListenerC0013b());
b.this.a("user_input", "payu_back_button");
b.this.onBackPressed(builder);
builder.show();
return true;
}
b.this.a("user_input", "m_back_button");
b.this.onBackPressed(null);
b.this.b.onBackPressed();
}
return false;
}
}
class q implements OtpCallback {
q() {
}
@Override
public void onOtpReceived(String str) {
b.this.e0 = str;
com.payu.custombrowser.util.e.b("onOtpReceived " + b.this.e0);
b.this.fillOTPOnBankPage();
b bVar = b.this;
String str2 = bVar.e0;
bVar.backupOfOTP = str2;
bVar.otpTriggered = true;
try {
bVar.isOTPFilled = false;
if (bVar.catchAllJSEnabled && !TextUtils.isEmpty(str2)) {
JSONObject jSONObject = new JSONObject();
jSONObject.put(Constants.OTP, str2);
jSONObject.put("isAutoFillOTP", true);
WebView webView = b.this.n;
StringBuilder append = new StringBuilder().append("javascript:");
b bVar2 = b.this;
webView.loadUrl(append.append(bVar2.c.getString(bVar2.getString(R.string.cb_fill_otp))).append("(").append(jSONObject).append(")").toString());
}
} catch (JSONException e) {
e.printStackTrace();
}
b.this.fillOTP();
}
@Override
public void onUserDenied() {
com.payu.custombrowser.util.e.b("onUserDenied permissionGranted " + b.this.j0);
b bVar = b.this;
bVar.j0 = false;
bVar.b(bVar.i0);
}
}
class r implements View.OnClickListener {
final TextView a;
r(TextView textView) {
this.a = textView;
}
@Override
public void onClick(View view) {
try {
b bVar = b.this;
bVar.e0 = null;
bVar.i = "approved_otp";
bVar.a("user_input", "approved_otp");
b.this.a("Approve_btn_clicked_time", "-1");
b.this.o();
b bVar2 = b.this;
bVar2.h0 = false;
bVar2.g0 = Boolean.TRUE;
bVar2.onHelpUnavailable();
b.this.g();
b.this.u = 1;
if (this.a.getText() != null) {
WebView webView = b.this.n;
StringBuilder append = new StringBuilder().append("javascript:");
b bVar3 = b.this;
webView.loadUrl(append.append(bVar3.d.optString(bVar3.getString(R.string.cb_process_otp))).append("(\"").append(this.a.getText().toString()).append("\")").toString());
}
this.a.setText("");
b.this.f();
} catch (Exception e) {
}
}
}
class s implements Runnable {
class a implements Runnable {
final String a;
a(String str) {
this.a = str;
}
@Override
public void run() {
b.this.n.loadUrl("javascript:" + this.a);
}
}
class RunnableC0014b implements Runnable {
final String a;
RunnableC0014b(String str) {
this.a = str;
}
@Override
public void run() {
b.this.n.loadUrl("javascript:" + this.a);
}
}
class c implements Runnable {
c() {
}
@Override
public void run() {
b.this.onPageStarted();
}
}
s() {
}
@Override
public void run() {
Activity activity;
Activity activity2;
HttpsURLConnection e = com.payu.custombrowser.util.c.e(b.this.a + "initialize.js");
String str = "";
try {
if (e != null) {
try {
if (e.getResponseCode() == 200) {
b.this.H.a(e.getInputStream(), b.this.b, "initialize", 0);
}
} catch (Exception e2) {
Activity activity3 = b.this.b;
if (activity3 == null || activity3.isFinishing()) {
return;
}
b.this.c = new JSONObject(com.payu.custombrowser.util.c.a(b.this.b.openFileInput("initialize")));
b.this.j();
b bVar = b.this;
if (!bVar.D) {
bVar.checkStatusFromJS("", 1);
b.this.checkStatusFromJS("", 2);
}
String str2 = b.this.c.has("snooze_config") ? b.this.c.get("snooze_config") + "('" + Bank.keyAnalytics + "')" : "";
b.snoozeImageDownloadTimeout = Integer.parseInt(b.this.c.has("snooze_image_download_time") ? b.this.c.get("snooze_image_download_time").toString() : "0");
com.payu.custombrowser.util.g.a(b.this.b.getApplicationContext(), "com.payu.custombrowser.payucustombrowser", com.payu.custombrowser.util.b.SNOOZE_IMAGE_DOWNLOAD_TIME_OUT, b.snoozeImageDownloadTimeout);
b bVar2 = b.this;
if (bVar2.c.has(bVar2.getString(R.string.sp_internet_restored_ttl))) {
StringBuilder sb = new StringBuilder();
b bVar3 = b.this;
str = sb.append(bVar3.c.get(bVar3.getString(R.string.sp_internet_restored_ttl))).append("('").append(Bank.keyAnalytics).append("')").toString();
}
b.this.b.runOnUiThread(new a(str2));
b.this.b.runOnUiThread(new RunnableC0014b(str));
if (b.this.c.has(com.payu.custombrowser.util.b.SUREPAY_S2S)) {
b bVar4 = b.this;
bVar4.H.c(bVar4.b, com.payu.custombrowser.util.b.SUREPAY_S2S, bVar4.c.getString(com.payu.custombrowser.util.b.SUREPAY_S2S));
}
b bVar5 = b.this;
if (!bVar5.m0 || (activity = bVar5.b) == null) {
return;
}
activity.runOnUiThread(new c());
return;
} catch (Throwable th) {
try {
Activity activity4 = b.this.b;
if (activity4 == null) {
throw th;
}
if (activity4.isFinishing()) {
throw th;
}
b.this.c = new JSONObject(com.payu.custombrowser.util.c.a(b.this.b.openFileInput("initialize")));
b.this.j();
b bVar6 = b.this;
if (!bVar6.D) {
bVar6.checkStatusFromJS("", 1);
b.this.checkStatusFromJS("", 2);
}
String str3 = b.this.c.has("snooze_config") ? b.this.c.get("snooze_config") + "('" + Bank.keyAnalytics + "')" : "";
b.snoozeImageDownloadTimeout = Integer.parseInt(b.this.c.has("snooze_image_download_time") ? b.this.c.get("snooze_image_download_time").toString() : "0");
com.payu.custombrowser.util.g.a(b.this.b.getApplicationContext(), "com.payu.custombrowser.payucustombrowser", com.payu.custombrowser.util.b.SNOOZE_IMAGE_DOWNLOAD_TIME_OUT, b.snoozeImageDownloadTimeout);
b bVar7 = b.this;
if (bVar7.c.has(bVar7.getString(R.string.sp_internet_restored_ttl))) {
StringBuilder sb2 = new StringBuilder();
b bVar8 = b.this;
str = sb2.append(bVar8.c.get(bVar8.getString(R.string.sp_internet_restored_ttl))).append("('").append(Bank.keyAnalytics).append("')").toString();
}
b.this.b.runOnUiThread(new a(str3));
b.this.b.runOnUiThread(new RunnableC0014b(str));
if (b.this.c.has(com.payu.custombrowser.util.b.SUREPAY_S2S)) {
b bVar9 = b.this;
bVar9.H.c(bVar9.b, com.payu.custombrowser.util.b.SUREPAY_S2S, bVar9.c.getString(com.payu.custombrowser.util.b.SUREPAY_S2S));
}
b bVar10 = b.this;
if (!bVar10.m0) {
throw th;
}
Activity activity5 = bVar10.b;
if (activity5 == null) {
throw th;
}
activity5.runOnUiThread(new c());
throw th;
} catch (FileNotFoundException e3) {
b.this.c();
throw th;
} catch (JSONException e4) {
b.this.c();
throw th;
} catch (Exception e5) {
b.this.c();
throw th;
}
}
}
Activity activity6 = b.this.b;
if (activity6 == null || activity6.isFinishing()) {
return;
}
b.this.c = new JSONObject(com.payu.custombrowser.util.c.a(b.this.b.openFileInput("initialize")));
b.this.j();
b bVar11 = b.this;
if (!bVar11.D) {
bVar11.checkStatusFromJS("", 1);
b.this.checkStatusFromJS("", 2);
}
String str4 = b.this.c.has("snooze_config") ? b.this.c.get("snooze_config") + "('" + Bank.keyAnalytics + "')" : "";
b.snoozeImageDownloadTimeout = Integer.parseInt(b.this.c.has("snooze_image_download_time") ? b.this.c.get("snooze_image_download_time").toString() : "0");
com.payu.custombrowser.util.g.a(b.this.b.getApplicationContext(), "com.payu.custombrowser.payucustombrowser", com.payu.custombrowser.util.b.SNOOZE_IMAGE_DOWNLOAD_TIME_OUT, b.snoozeImageDownloadTimeout);
b bVar12 = b.this;
if (bVar12.c.has(bVar12.getString(R.string.sp_internet_restored_ttl))) {
StringBuilder sb3 = new StringBuilder();
b bVar13 = b.this;
str = sb3.append(bVar13.c.get(bVar13.getString(R.string.sp_internet_restored_ttl))).append("('").append(Bank.keyAnalytics).append("')").toString();
}
b.this.b.runOnUiThread(new a(str4));
b.this.b.runOnUiThread(new RunnableC0014b(str));
if (b.this.c.has(com.payu.custombrowser.util.b.SUREPAY_S2S)) {
b bVar14 = b.this;
bVar14.H.c(bVar14.b, com.payu.custombrowser.util.b.SUREPAY_S2S, bVar14.c.getString(com.payu.custombrowser.util.b.SUREPAY_S2S));
}
b bVar15 = b.this;
if (!bVar15.m0 || (activity2 = bVar15.b) == null) {
return;
}
activity2.runOnUiThread(new c());
} catch (FileNotFoundException e6) {
b.this.c();
} catch (JSONException e7) {
b.this.c();
} catch (Exception e8) {
b.this.c();
}
}
}
public class t extends a.j {
public t() {
super();
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
com.payu.custombrowser.util.e.b("Class Name: " + t.class.getCanonicalName() + "onTouch of PayUCBLifeCycleCalled");
b.this.k();
return super.onTouch(view, motionEvent);
}
}
public void k() {
if (this.forwardJourneyForChromeLoaderIsComplete) {
this.firstTouch = true;
dismissSlowUserWarningTimer();
}
}
private void l() {
this.i = "payment_initiated";
a("user_input", "payment_initiated");
this.Q.execute(new s());
}
private void n() {
this.n.getSettings().setJavaScriptEnabled(true);
this.n.addJavascriptInterface(this, "PayU");
this.n.getSettings().setSupportMultipleWindows(true);
this.n.setOnTouchListener(new o());
this.n.getSettings().setDomStorageEnabled(true);
this.n.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH);
this.n.getSettings().setCacheMode(2);
this.n.getSettings().setAppCacheEnabled(false);
}
public void p() {
androidx.appcompat.app.AlertDialog alertDialog = this.g;
if (alertDialog != null && alertDialog.isShowing()) {
this.g.cancel();
this.g.dismiss();
}
Activity activity = this.b;
if (activity == null || activity.isFinishing()) {
return;
}
View inflate = this.b.getLayoutInflater().inflate(R.layout.cb_layout_snooze, (ViewGroup) null);
((TextView) inflate.findViewById(R.id.snooze_header_txt)).setText(getString(R.string.cb_snooze_network_error));
inflate.findViewById(R.id.text_view_cancel_snooze_window).setVisibility(8);
((TextView) inflate.findViewById(R.id.text_view_snooze_message)).setText(getString(R.string.cb_snooze_network_down_message));
inflate.findViewById(R.id.snooze_loader_view).setVisibility(8);
inflate.findViewById(R.id.button_snooze_transaction).setVisibility(8);
inflate.findViewById(R.id.text_view_retry_message_detail).setVisibility(8);
inflate.findViewById(R.id.button_retry_transaction).setVisibility(8);
inflate.findViewById(R.id.button_cancel_transaction).setVisibility(8);
inflate.findViewById(R.id.t_confirm).setVisibility(8);
inflate.findViewById(R.id.t_nconfirm).setVisibility(8);
Button button = (Button) inflate.findViewById(R.id.button_go_back_snooze);
button.setVisibility(0);
button.setOnClickListener(new m());
androidx.appcompat.app.AlertDialog create = new AlertDialog.Builder(this.b, R.style.cb_snooze_dialog).create();
this.g = create;
create.setView(inflate);
this.g.setCanceledOnTouchOutside(false);
this.g.setOnCancelListener(new n());
this.g.show();
}
abstract void b(String str);
public void cbOldFlowOnCreateView() {
this.n = (WebView) this.b.findViewById(getArguments().getInt(com.payu.custombrowser.util.b.WEBVIEW));
String str = Bank.U0;
if (str == null || !str.equalsIgnoreCase("nb")) {
CustomBrowserConfig customBrowserConfig = this.customBrowserConfig;
if (customBrowserConfig != null && customBrowserConfig.getViewPortWideEnable() == 1) {
this.n.getSettings().setUseWideViewPort(true);
}
} else {
this.n.getSettings().setUseWideViewPort(true);
}
this.n.setFocusable(true);
this.n.setOnKeyListener(new p());
String str2 = Bank.U0;
if ((str2 == null || !str2.equalsIgnoreCase("nb")) && !this.C.getBoolean(com.payu.custombrowser.util.b.VIEWPORTWIDE, false)) {
return;
}
this.n.getSettings().setUseWideViewPort(true);
}
public void cbOldOnCreate() {
Bundle arguments = getArguments();
this.C = arguments;
this.autoApprove = arguments.getBoolean(com.payu.custombrowser.util.b.AUTO_APPROVE, false);
this.autoSelectOtp = this.C.getBoolean(com.payu.custombrowser.util.b.AUTO_SELECT_OTP, false);
this.x = this.C.getBoolean(com.payu.custombrowser.util.b.MERCHANT_SMS_PERMISSION, false);
String str = Bank.V0;
if (str == null || str.equalsIgnoreCase("")) {
Bank.V0 = getArguments().getString(com.payu.custombrowser.util.b.SDK_DETAILS);
}
String str2 = Bank.T0;
if (str2 == null || str2.equalsIgnoreCase("")) {
Bank.T0 = getArguments().getString("txnid");
}
String str3 = Bank.keyAnalytics;
if (str3 == null || str3.equalsIgnoreCase("")) {
Bank.keyAnalytics = getArguments().getString("merchantid");
}
}
public void cbOnCreate() {
if (getArguments() == null || !getArguments().containsKey("cb_config")) {
return;
}
this.customBrowserConfig = (CustomBrowserConfig) getArguments().getParcelable("cb_config");
this.reviewOrderDetailList = getArguments().getParcelableArrayList(com.payu.custombrowser.util.b.ORDER_DETAILS);
CustomBrowserConfig customBrowserConfig = this.customBrowserConfig;
boolean z = false;
this.x = customBrowserConfig != null && customBrowserConfig.getMerchantSMSPermission() == 1;
CustomBrowserConfig customBrowserConfig2 = this.customBrowserConfig;
this.autoApprove = customBrowserConfig2 != null && customBrowserConfig2.getAutoApprove() == 1;
CustomBrowserConfig customBrowserConfig3 = this.customBrowserConfig;
if (customBrowserConfig3 != null && customBrowserConfig3.getAutoSelectOTP() == 1) {
z = true;
}
this.autoSelectOtp = z;
if (this.customBrowserConfig != null) {
String str = Bank.keyAnalytics;
if (str == null || str.trim().equals("")) {
if (this.customBrowserConfig.getMerchantKey() == null && this.customBrowserConfig.getMerchantKey().trim().equals("")) {
Bank.keyAnalytics = "";
} else {
Bank.keyAnalytics = this.customBrowserConfig.getMerchantKey();
}
}
String str2 = Bank.T0;
if (str2 == null || str2.trim().equals("")) {
if (this.customBrowserConfig.getTransactionID() == null || this.customBrowserConfig.getTransactionID().trim().equals("")) {
Bank.T0 = "123";
} else {
Bank.T0 = this.customBrowserConfig.getTransactionID();
}
}
String str3 = Bank.V0;
if (str3 == null || str3.trim().equals("")) {
if (this.customBrowserConfig.getSdkVersionName() == null || this.customBrowserConfig.getSdkVersionName().trim().equals("")) {
Bank.V0 = "";
} else {
Bank.V0 = this.customBrowserConfig.getSdkVersionName();
}
}
if (TextUtils.isEmpty(this.customBrowserConfig.getSurepayS2Surl()) && TextUtils.isEmpty(this.customBrowserConfig.getHtmlData())) {
return;
}
this.isS2SHtmlSupport = true;
}
}
public void cbOnCreateView() {
String str = Bank.U0;
if (str == null || !str.equalsIgnoreCase("nb")) {
CustomBrowserConfig customBrowserConfig = this.customBrowserConfig;
if (customBrowserConfig != null && customBrowserConfig.getViewPortWideEnable() == 1) {
this.n.getSettings().setUseWideViewPort(true);
}
} else {
this.n.getSettings().setUseWideViewPort(true);
}
Bank bank = (Bank) this;
this.n.setWebChromeClient(new PayUWebChromeClient(bank));
if (this.customBrowserConfig.getEnableSurePay() > 0) {
this.n.setWebViewClient(new PayUSurePayWebViewClient(bank, Bank.keyAnalytics));
} else {
this.n.setWebViewClient(new PayUWebViewClient(bank, Bank.keyAnalytics));
}
if (!TextUtils.isEmpty(this.customBrowserConfig.getHtmlData())) {
a("cb_status", "load_html");
this.n.loadDataWithBaseURL("https://secure.payu.in/_payment", this.customBrowserConfig.getHtmlData(), "text/html", "UTF-8", null);
} else if (TextUtils.isEmpty(this.customBrowserConfig.getSurepayS2Surl())) {
CustomBrowserConfig customBrowserConfig2 = this.customBrowserConfig;
if (customBrowserConfig2 != null && customBrowserConfig2.getPostURL() != null && this.customBrowserConfig.getPayuPostData() != null) {
this.n.postUrl(this.customBrowserConfig.getPostURL(), this.customBrowserConfig.getPayuPostData().getBytes());
}
} else {
this.n.loadUrl(this.customBrowserConfig.getSurepayS2Surl());
}
com.payu.custombrowser.bean.b bVar = com.payu.custombrowser.bean.b.SINGLETON;
if (bVar.getPayuCustomBrowserCallback() != null) {
bVar.getPayuCustomBrowserCallback().setCBProperties(this.n, bank);
}
this.mAnalyticsMap = new HashMap<>();
String f2 = com.payu.custombrowser.util.c.f(getContext());
if (f2.length() <= 0 || f2.contentEquals(com.payu.custombrowser.util.c.a(new WebView(getContext())))) {
return;
}
a("web_view_updated_successfully", com.payu.custombrowser.util.c.a(new WebView(getContext())));
com.payu.custombrowser.util.c.g(getContext(), "");
}
protected void dismissSlowUserWarning() {
android.app.AlertDialog alertDialog = this.slowUserWarningDialog;
if (alertDialog != null) {
alertDialog.dismiss();
}
}
abstract void dismissSlowUserWarningTimer();
public void fillOTP() {
char c2;
if (getActivity().findViewById(R.id.otp_sms) != null) {
TextView textView = (TextView) getActivity().findViewById(R.id.otp_sms);
if (!this.d0 || this.e0 == null) {
return;
}
this.H.a(this.f0);
String str = this.i;
str.hashCode();
switch (str.hashCode()) {
case -557081102:
if (str.equals("payment_initiated")) {
c2 = 0;
break;
}
c2 = 65535;
break;
case 674270068:
if (str.equals("otp_click")) {
c2 = 1;
break;
}
c2 = 65535;
break;
case 2084916017:
if (str.equals("regenerate_click")) {
c2 = 2;
break;
}
c2 = 65535;
break;
default:
c2 = 65535;
break;
}
switch (c2) {
case 0:
this.i = "received_otp_direct";
break;
case 1:
this.i = "received_otp_selected";
break;
case 2:
this.i = "received_otp_regenerate";
break;
default:
this.i = "otp_web";
break;
}
a("otp_received", this.i);
textView.setText(this.e0);
this.e0 = null;
this.o0.a(getActivity().findViewById(R.id.progress));
Button button = (Button) getActivity().findViewById(R.id.approve);
button.setClickable(true);
com.payu.custombrowser.util.c.a(1.0f, button);
button.setVisibility(0);
this.b.findViewById(R.id.timer).setVisibility(8);
this.b.findViewById(R.id.retry_text).setVisibility(8);
this.b.findViewById(R.id.regenerate_layout).setVisibility(8);
this.b.findViewById(R.id.waiting).setVisibility(8);
this.b.findViewById(R.id.otp_recieved).setVisibility(0);
textView.setVisibility(0);
if (this.autoApprove) {
button.performClick();
this.i = com.payu.custombrowser.util.b.AUTO_APPROVE;
a("user_input", com.payu.custombrowser.util.b.AUTO_APPROVE);
}
button.setOnClickListener(new r(textView));
}
}
public void fillOTPOnBankPage() {
try {
if (this.d == null || TextUtils.isEmpty(this.e0) || !this.d.has(getString(R.string.cb_fill_otp))) {
return;
}
this.n.loadUrl("javascript:" + this.d.getString(getString(R.string.cb_fill_otp)) + "(\"" + this.e0 + "\",\"url\")");
this.e0 = null;
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public void logOnTerminate() {
try {
a("last_url", com.payu.custombrowser.util.c.i(this.H.c(this.b.getApplicationContext(), "last_url")));
} catch (Exception e2) {
} finally {
this.H.a(this.b.getApplicationContext(), "last_url");
}
ArrayList<String> arrayList = this.k;
if (arrayList != null && !arrayList.contains("CUSTOM_BROWSER")) {
if (this.k.contains("review_order_custom_browser")) {
this.i = "review_order_custom_browser";
} else {
this.i = "NON_CUSTOM_BROWSER";
}
a("cb_status", this.i);
}
this.i = "terminate_transaction";
a("user_input", "terminate_transaction");
com.payu.custombrowser.widgets.a aVar = this.r;
if (aVar != null && !aVar.isShowing()) {
this.r.dismiss();
}
String str = this.listOfTxtFld;
if (str != null && str.length() > 1 && !this.isOTPFilled) {
a("bank_page_otp_fields", this.listOfTxtFld);
a("bank_page_host_name", this.hostName);
}
this.H.a((Context) this.b);
}
abstract void m();
public void markPreviousTxnAsUserCanceled(String str) {
new com.payu.custombrowser.widgets.b(str, this.h.getUrl()).a();
}
void o() {
if (this.isListenerAttached) {
return;
}
this.isListenerAttached = true;
Bundle bundle = new Bundle();
bundle.putString("merchant_key", this.customBrowserConfig.getMerchantKey());
bundle.putString("txnid", this.customBrowserConfig.getTransactionID());
this.e.startListening(new q(), bundle);
}
public void onActivityResult(int i2, int i3, Intent intent) {
this.e.onActivityResult(i2, i3, intent);
}
public void onAttach(Context context) {
super.onAttach(context);
this.b = (Activity) context;
this.e = OtpParser.INSTANCE.getInstance(getActivity());
}
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.surePayS2SPayUId = null;
this.isSnoozeEnabled = this.H.a(com.payu.custombrowser.util.b.SNOOZE_ENABLED, this.b.getApplicationContext());
u0 = false;
SnoozeConfigMap a2 = this.H.a(com.payu.custombrowser.util.g.a(this.b, com.payu.custombrowser.util.b.SNOOZE_SHARED_PREF));
this.q0 = a2;
int[] percentageAndTimeout = a2.getPercentageAndTimeout(com.payu.custombrowser.util.b.DEFAULT_PAYMENT_URLS);
this.p0 = percentageAndTimeout;
this.snoozeUrlLoadingPercentage = percentageAndTimeout[0];
this.snoozeUrlLoadingTimeout = percentageAndTimeout[1];
this.t0 = this.H.a(this.q0, com.payu.custombrowser.util.b.DEFAULT_PAYMENT_URLS);
snoozeImageDownloadTimeout = com.payu.custombrowser.util.g.b(this.b.getApplicationContext(), "com.payu.custombrowser.payucustombrowser", com.payu.custombrowser.util.b.SNOOZE_IMAGE_DOWNLOAD_TIME_OUT, 0);
SnoozeService snoozeService = this.snoozeService;
if (snoozeService != null) {
snoozeService.d();
}
if (this.b.getIntent().getStringExtra(com.payu.custombrowser.util.b.SENDER) != null && this.b.getIntent().getStringExtra(com.payu.custombrowser.util.b.SENDER).contentEquals(com.payu.custombrowser.util.b.SNOOZE_SERVICE)) {
u0 = true;
}
this.snoozeBroadCastReceiver = new l();
if (this.b.getClass().getSimpleName().equalsIgnoreCase("CBActivity")) {
cbOnCreate();
} else {
this.D = true;
cbOldOnCreate();
}
this.H.a(this.customBrowserConfig);
initAnalytics(Bank.keyAnalytics);
this.b0 = false;
if (this.b != null) {
this.H.a(this.customBrowserConfig);
this.surePayS2SPayUId = null;
this.surePayS2Surl = null;
}
if (this.customBrowserConfig != null) {
a("snooze_enable_count", "" + this.customBrowserConfig.getEnableSurePay());
a("snooze_mode_set_merchant", this.customBrowserConfig.getSurePayMode() == 1 ? "WARN" : "FAIL");
}
}
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate;
View findViewById;
super.onCreateView(layoutInflater, viewGroup, bundle);
if (this.D) {
inflate = layoutInflater.inflate(R.layout.bankold, viewGroup, false);
inflate.bringToFront();
cbOldFlowOnCreateView();
findViewById = inflate;
} else {
inflate = layoutInflater.inflate(R.layout.bank, viewGroup, false);
this.G = inflate.findViewById(R.id.trans_overlay);
this.n = (WebView) inflate.findViewById(R.id.webview);
this.Y = inflate.findViewById(R.id.cb_blank_overlay);
findViewById = inflate.findViewById(R.id.parent);
this.V = (TextView) inflate.findViewById(R.id.t_payu_review_order_cb);
this.U = (TextView) inflate.findViewById(R.id.t_payu_review_order);
setReviewOrderButtonProperty(this.V);
this.T = (RelativeLayout) inflate.findViewById(R.id.r_payu_review_order);
cbOnCreateView();
if (this.customBrowserConfig.getEnableReviewOrder() == 0) {
if (this.customBrowserConfig.getReviewOrderCustomView() != -1) {
a("review_order_type", "review_order_custom");
} else {
a("review_order_type", "review_order_default");
}
}
}
this.E = (FrameLayout) inflate.findViewById(R.id.help_view);
this.F = inflate.findViewById(R.id.view);
this.t = (ProgressBar) inflate.findViewById(R.id.cb_progressbar);
n();
this.viewOnClickListener = new a.k();
l();
this.mAnalyticsMap = new HashMap<>();
findViewById.setOnTouchListener(new t());
return inflate;
}
public void onDestroy() {
super.onDestroy();
this.mHandler.removeCallbacks(this.mResetCounter);
this.H.a(this.timerProgress);
this.H.a(this.f0);
this.isListenerAttached = false;
CountDownTimer countDownTimer = this.slowUserCountDownTimer;
if (countDownTimer != null) {
countDownTimer.cancel();
}
a("snooze_count", "" + (this.snoozeVisibleCountBackwdJourney + this.snoozeVisibleCountFwdJourney));
com.payu.custombrowser.bean.b.SINGLETON.setPayuCustomBrowserCallback(null);
androidx.appcompat.app.AlertDialog alertDialog = this.g;
if (alertDialog != null && alertDialog.isShowing()) {
this.g.dismiss();
}
if (this.snoozeBroadCastReceiver != null && this.isSnoozeBroadCastReceiverRegistered && !u0) {
LocalBroadcastManager.getInstance(this.b.getApplicationContext()).unregisterReceiver(this.snoozeBroadCastReceiver);
}
ServiceConnection serviceConnection = this.snoozeServiceConnection;
if (serviceConnection != null && this.isSnoozeServiceBounded) {
this.b.unbindService(serviceConnection);
}
SnoozeService snoozeService = this.snoozeService;
if (snoozeService != null && u0) {
snoozeService.d();
}
View view = this.I;
if (view != null) {
this.o0.b(view.findViewById(R.id.progress));
}
View view2 = this.J;
if (view2 != null) {
this.o0.b(view2.findViewById(R.id.progress));
}
PayUDeviceAnalytics payUDeviceAnalytics = this.K;
if (payUDeviceAnalytics != null) {
payUDeviceAnalytics.cancelTimer();
}
PayUAnalytics payUAnalytics = this.h;
if (payUAnalytics != null) {
payUAnalytics.cancelTimer();
}
this.H.a(this.f0);
CountDownTimer countDownTimer2 = this.L;
if (countDownTimer2 != null) {
countDownTimer2.cancel();
}
logOnTerminate();
Bank.V0 = null;
Bank.keyAnalytics = null;
Bank.T0 = null;
Bank.U0 = null;
WebView webView = this.n;
if (webView != null) {
webView.destroy();
}
this.H.b(this.customBrowserConfig);
this.surePayS2SPayUId = null;
}
public void onDestroyView() {
super.onDestroyView();
this.H.a(this.timerProgress);
androidx.appcompat.app.AlertDialog alertDialog = this.g;
if (alertDialog != null && alertDialog.isShowing()) {
this.g.dismiss();
}
com.payu.custombrowser.widgets.a aVar = this.r;
if (aVar != null) {
aVar.dismiss();
}
}
abstract void onPageStarted();
public void onRequestPermissionsResult(int i2, String[] strArr, int[] iArr) {
this.l0 = false;
if (this.n0) {
try {
this.n.loadUrl("javascript:" + this.d.getString(getString(R.string.cb_otp)));
} catch (JSONException e2) {
e2.printStackTrace();
}
}
if (ContextCompat.checkSelfPermission(this.b, "android.permission.RECEIVE_SMS") == 0) {
this.j0 = true;
this.e0 = null;
}
this.e.onRequestPermissionsResult(i2, strArr, iArr);
if (this.n0) {
b(this.i0);
}
}
public void onResume() {
super.onResume();
if (this.Z) {
this.Z = false;
cancelTransactionNotification();
Intent intent = this.a0;
if (intent == null) {
a("internet_not_restored_dialog_recent_app", "-1");
return;
}
if (this.backwardJourneyStarted) {
try {
if (Integer.parseInt(new JSONObject(intent.getStringExtra("value")).optString(getString(R.string.cb_snooze_verify_api_status))) == 1) {
a("transaction_verified_dialog_recent_app", "-1");
} else {
a("transaction_not_verified_dialog_recent_app", "-1");
}
} catch (Exception e2) {
a("transaction_not_verified_dialog_recent_app", "-1");
}
} else {
a("internet_restored_dialog_recent_app", "-1");
}
a(this.a0);
}
}
public void postDataToSurl(String str, String str2) {
new Thread(new j(this, str2, str)).start();
}
abstract void reloadWebView();
abstract void reloadWebView(String str);
abstract void reloadWebView(String str, String str2);
public void resumeTransaction(Intent intent) {
this.customBrowserConfig = (CustomBrowserConfig) intent.getExtras().getParcelable("cb_config");
if (intent.getStringExtra(com.payu.custombrowser.util.b.CURRENT_URL) == null || intent.getStringExtra(com.payu.custombrowser.util.b.S2S_RETRY_URL) != null) {
if (intent.getStringExtra(com.payu.custombrowser.util.b.S2S_RETRY_URL) != null) {
reloadWebView(intent.getStringExtra(com.payu.custombrowser.util.b.S2S_RETRY_URL), null);
return;
} else {
reloadWebView(this.customBrowserConfig.getPostURL(), this.customBrowserConfig.getPayuPostData());
return;
}
}
if (intent.getStringExtra(com.payu.custombrowser.util.b.CURRENT_URL).equalsIgnoreCase(this.customBrowserConfig.getPostURL())) {
if (this.customBrowserConfig.getPostURL().contentEquals("https://secure.payu.in/_payment") || this.customBrowserConfig.getPostURL().contentEquals("https://mobiletest.payu.in/_payment")) {
markPreviousTxnAsUserCanceled(com.payu.custombrowser.util.c.a(this.b.getApplicationContext(), "sure_pay_cancelled", this.customBrowserConfig.getTransactionID(), "", Bank.keyAnalytics, this.customBrowserConfig.getTransactionID(), ""));
}
reloadWebView(this.customBrowserConfig.getPostURL(), this.customBrowserConfig.getPayuPostData());
return;
}
if (Bank.isUrlWhiteListed(intent.getStringExtra(com.payu.custombrowser.util.b.CURRENT_URL))) {
reloadWebView(intent.getStringExtra(com.payu.custombrowser.util.b.CURRENT_URL));
return;
}
if (this.customBrowserConfig.getPostURL().contentEquals("https://secure.payu.in/_payment") || this.customBrowserConfig.getPostURL().contentEquals("https://mobiletest.payu.in/_payment")) {
markPreviousTxnAsUserCanceled(com.payu.custombrowser.util.c.a(this.b.getApplicationContext(), "sure_pay_cancelled", this.customBrowserConfig.getTransactionID(), "", Bank.keyAnalytics, this.customBrowserConfig.getTransactionID(), ""));
}
reloadWebView(this.customBrowserConfig.getPostURL(), this.customBrowserConfig.getPayuPostData());
}
protected void showCbBlankOverlay(int i2) {
View view = this.Y;
if (view != null) {
view.setVisibility(i2);
}
}
protected void showSlowUserWarning() {
Activity activity = this.b;
if (activity == null || activity.isFinishing() || this.j) {
return;
}
View inflate = this.b.getLayoutInflater().inflate(R.layout.cb_layout_snooze_slow_user, (ViewGroup) null);
((TextView) inflate.findViewById(R.id.snooze_header_txt)).setText(R.string.cb_snooze_slow_user_warning_header);
TextView textView = (TextView) inflate.findViewById(R.id.text_view_cancel_snooze_window);
ImageView imageView = (ImageView) inflate.findViewById(R.id.snooze_status_icon);
imageView.setVisibility(0);
imageView.setImageDrawable(getCbDrawable(this.b.getApplicationContext(), R.drawable.hourglass));
if (this.slowUserWarningDialog == null) {
android.app.AlertDialog create = new AlertDialog.Builder(this.b).create();
this.slowUserWarningDialog = create;
create.setView(inflate);
this.slowUserWarningDialog.setCanceledOnTouchOutside(true);
this.slowUserWarningDialog.setOnDismissListener(new a(this));
this.slowUserWarningDialog.setOnKeyListener(new DialogInterfaceOnKeyListenerC0012b());
textView.setOnClickListener(new c());
}
this.slowUserWarningDialog.show();
if (CBActivity.g == 1) {
showSlowUserWarningNotification();
}
}
protected void showSlowUserWarningNotification() {
Activity activity = this.b;
if (activity == null || activity.isFinishing()) {
return;
}
new Intent();
}
public void showTransactionStatusDialog(java.lang.String r10, boolean r11) {
throw new UnsupportedOperationException("Method not decompiled: com.payu.custombrowser.b.showTransactionStatusDialog(java.lang.String, boolean):void");
}
public void updateHeight(View view) {
if (this.q == 0) {
a();
g();
}
a(view);
}
public void updateLoaderHeight() {
if (this.c0 == 0) {
this.n.measure(-1, -1);
this.c0 = (int) (this.n.getMeasuredHeight() * 0.35d);
}
}
protected void updateSnoozeDialogWithMessage(String str, String str2) {
androidx.appcompat.app.AlertDialog alertDialog = this.g;
if (alertDialog != null && alertDialog.isShowing()) {
this.g.cancel();
this.g.dismiss();
}
SnoozeService snoozeService = this.snoozeService;
if (snoozeService != null) {
snoozeService.d();
}
m();
Activity activity = this.b;
if (activity == null || activity.isFinishing()) {
return;
}
View inflate = this.b.getLayoutInflater().inflate(R.layout.cb_layout_snooze, (ViewGroup) null);
((TextView) inflate.findViewById(R.id.snooze_header_txt)).setText(str);
inflate.findViewById(R.id.text_view_cancel_snooze_window).setVisibility(8);
((TextView) inflate.findViewById(R.id.text_view_snooze_message)).setText(str2);
SnoozeLoaderView snoozeLoaderView = (SnoozeLoaderView) inflate.findViewById(R.id.snooze_loader_view);
snoozeLoaderView.setVisibility(0);
snoozeLoaderView.c();
inflate.findViewById(R.id.button_snooze_transaction).setVisibility(8);
inflate.findViewById(R.id.text_view_retry_message_detail).setVisibility(8);
inflate.findViewById(R.id.button_retry_transaction).setVisibility(8);
inflate.findViewById(R.id.button_cancel_transaction).setVisibility(8);
inflate.findViewById(R.id.t_confirm).setVisibility(8);
inflate.findViewById(R.id.t_nconfirm).setVisibility(8);
inflate.findViewById(R.id.button_go_back_snooze).setVisibility(8);
androidx.appcompat.app.AlertDialog create = new AlertDialog.Builder(this.b).create();
this.g = create;
create.setView(inflate);
this.g.setCancelable(false);
this.g.setCanceledOnTouchOutside(false);
hideReviewOrderHorizontalBar();
this.g.show();
}
public void a(Intent intent) {
int i2;
CustomBrowserConfig customBrowserConfig = this.customBrowserConfig;
if (customBrowserConfig == null) {
i2 = 5000;
} else {
i2 = customBrowserConfig.getInternetRestoredWindowTTL();
}
int i3 = this.s0;
if (i3 != 0) {
i2 = i3;
}
if (this.backwardJourneyStarted) {
try {
if (this.H.b(intent.getStringExtra("value"), getString(R.string.cb_snooze_verify_api_status)).contentEquals(com.payu.custombrowser.util.b.TRANSACTION_STATUS_SUCCESS)) {
Activity activity = this.b;
if (activity != null && !activity.isFinishing()) {
updateSnoozeDialogWithMessage(this.b.getResources().getString(R.string.cb_transaction_verified), this.b.getResources().getString(R.string.redirect_back_to_merchant));
}
} else {
Activity activity2 = this.b;
if (activity2 != null && !activity2.isFinishing()) {
updateSnoozeDialogWithMessage(this.b.getResources().getString(R.string.cb_transaction_state_unknown), this.b.getResources().getString(R.string.status_unknown_redirect_to_merchant));
}
}
} catch (Exception e2) {
Activity activity3 = this.b;
if (activity3 != null && !activity3.isFinishing()) {
updateSnoozeDialogWithMessage(this.b.getResources().getString(R.string.cb_transaction_state_unknown), this.b.getResources().getString(R.string.status_unknown_redirect_to_merchant));
}
}
} else {
Activity activity4 = this.b;
if (activity4 != null && !activity4.isFinishing()) {
updateSnoozeDialogWithMessage(this.b.getResources().getString(R.string.internet_restored), this.b.getResources().getString(R.string.resuming_your_transaction));
}
}
new Handler().postDelayed(new d(intent), i2);
}
}