正在查看: Hopscotch v9.7.2 应用的 CBActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Hopscotch v9.7.2 应用的 CBActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.payu.custombrowser;
import android.app.AlertDialog;
import android.app.NotificationManager;
import android.content.Intent;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.a;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import com.payu.custombrowser.bean.CustomBrowserConfig;
import com.payu.custombrowser.util.CBConstant;
import com.payu.upisdk.util.UpiConstant;
import java.util.Iterator;
import org.json.JSONException;
public class CBActivity extends androidx.appcompat.app.i {
protected static ArrayAdapter f;
protected static View g;
protected static View h;
CustomBrowserConfig a;
private Bank b;
private androidx.appcompat.app.h c;
private AlertDialog d;
com.payu.custombrowser.util.b e;
private void a() {
if (f == null || this.a.getCbDrawerCustomMenu() == 0) {
return;
}
DrawerLayout findViewById = findViewById(R.id.drawer_layout);
ListView listView = (ListView) getLayoutInflater().inflate(this.a.getCbDrawerCustomMenu(), (ViewGroup) null, false);
DrawerLayout.f fVar = new DrawerLayout.f(-1, -1);
fVar.a = 8388611;
if (listView.getParent() != null) {
((ViewGroup) listView.getParent()).removeView(listView);
}
findViewById.addView(listView);
listView.setLayoutParams(fVar);
listView.setAdapter((ListAdapter) f);
com.payu.custombrowser.bean.b.SINGLETON.getPayuCustomBrowserCallback().getNavigationDrawerObject(findViewById);
this.b.addEventAnalytics("CBActivity", "initDrawer");
}
public void cbSetToolBar(View view) {
if (view == null || getSupportActionBar() == null) {
if (getSupportActionBar() != null) {
getSupportActionBar().i();
}
} else {
getSupportActionBar().x(false);
if (view.getParent() != null) {
((ViewGroup) view.getParent()).removeView(view);
}
getSupportActionBar().r(view, new a.a(-1, -1));
getSupportActionBar().v();
view.getParent().setContentInsetsAbsolute(0, 0);
}
}
public void onActivityResult(int i, int i2, Intent intent) {
super/*androidx.fragment.app.n*/.onActivityResult(i, i2, intent);
Iterator it = getSupportFragmentManager().Y().iterator();
while (it.hasNext()) {
((Fragment) it.next()).onActivityResult(i, i2, intent);
}
}
public void onBackPressed() {
CustomBrowserConfig customBrowserConfig = this.a;
if (customBrowserConfig == null || customBrowserConfig.getDisableBackButtonDialog() == 1) {
this.b.l();
this.b.addEventAnalytics("user_input", "m_back_button");
com.payu.custombrowser.bean.b bVar = com.payu.custombrowser.bean.b.SINGLETON;
if (bVar.getPayuCustomBrowserCallback() != null) {
bVar.getPayuCustomBrowserCallback().onBackButton(null);
}
finish();
return;
}
Bank bank = this.b;
if (!bank.isCbBottomSheetExpanded) {
bank.addEventAnalytics("user_input", "payu_back_button".toLowerCase());
this.b.showBackButtonDialog();
return;
}
b bVar2 = bank.h;
if (bVar2 != null && bVar2.isAdded()) {
this.b.h.backButton();
} else {
this.b.addEventAnalytics("user_input", "payu_back_button".toLowerCase());
this.b.showBackButtonDialog();
}
}
public void onCreate(Bundle bundle) {
super/*androidx.fragment.app.n*/.onCreate((Bundle) null);
setContentView(R.layout.cb_payments);
this.b = new Bank(this);
this.e = new com.payu.custombrowser.util.b();
Bundle bundle2 = new Bundle();
CustomBrowserConfig customBrowserConfig = (CustomBrowserConfig) getIntent().getParcelableExtra("cb_config");
this.a = customBrowserConfig;
customBrowserConfig.setProgressDialogCustomView(h);
this.e.b(this.a);
bundle2.putParcelable("cb_config", this.a);
this.b.setArguments(bundle2);
cbSetToolBar(g);
a();
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a f2 = android.support.v4.media.a.f(supportFragmentManager, supportFragmentManager);
f2.k(R.id.main_frame, this.b, (String) null, 1);
f2.p(true);
this.b.addEventAnalytics("CBActivity", UpiConstant.LAUNCHED.toLowerCase());
}
public void onDestroy() {
AlertDialog alertDialog = this.d;
if (alertDialog != null && alertDialog.isShowing()) {
this.d.dismiss();
this.d.cancel();
}
androidx.appcompat.app.h hVar = this.c;
if (hVar != null && hVar.isShowing()) {
this.c.dismiss();
this.c.cancel();
}
Bank bank = this.b;
if (bank != null && bank.getSnoozeLoaderView() != null) {
this.b.getSnoozeLoaderView().a();
this.b.setSnoozeLoaderView(null);
}
com.payu.custombrowser.bean.b bVar = com.payu.custombrowser.bean.b.SINGLETON;
if (bVar.getPayuCustomBrowserCallback() != null) {
bVar.getPayuCustomBrowserCallback().onPaymentTerminate();
bVar.setPayuCustomBrowserCallback(null);
}
h = null;
g = null;
NotificationManager notificationManager = (NotificationManager) getSystemService("notification");
if (notificationManager != null) {
notificationManager.cancel(CBConstant.SNOOZE_NOTIFICATION_ID);
}
notificationManager.cancel(63);
super.onDestroy();
}
public void onNewIntent(Intent intent) {
Bank bank;
super/*androidx.activity.j*/.onNewIntent(intent);
if (intent == null || !intent.getStringExtra(CBConstant.SENDER).contentEquals(CBConstant.SNOOZE_SERVICE) || (bank = this.b) == null) {
return;
}
bank.b0 = null;
bank.a0 = false;
if (intent.getExtras() == null || !intent.getExtras().getBoolean(CBConstant.VERIFICATION_MSG_RECEIVED)) {
this.b.addEventAnalytics("internet_restored_notification_click", "-1");
this.b.resumeTransaction(intent);
return;
}
try {
String b = this.e.b(intent.getExtras().getString("payu_response"), getString(R.string.cb_snooze_verify_api_status));
if (b == null || !b.equalsIgnoreCase(CBConstant.TRANSACTION_STATUS_SUCCESS)) {
this.b.addEventAnalytics("transaction_not_verified_notification_click", "-1");
} else {
this.b.addEventAnalytics("transaction_verified_notification_click", "-1");
}
} catch (JSONException e) {
e.printStackTrace();
}
this.b.showTransactionStatusDialog(intent.getExtras().getString("payu_response"), true);
}
public void onPause() {
super/*androidx.fragment.app.n*/.onPause();
}
public void onRequestPermissionsResult(int i, @NonNull String[] strArr, @NonNull int[] iArr) {
super/*androidx.fragment.app.n*/.onRequestPermissionsResult(i, strArr, iArr);
Iterator it = getSupportFragmentManager().Y().iterator();
while (it.hasNext()) {
((Fragment) it.next()).onRequestPermissionsResult(i, strArr, iArr);
}
}
public void onResume() {
super/*androidx.fragment.app.n*/.onResume();
}
public void onSaveInstanceState(@NonNull Bundle bundle, @NonNull PersistableBundle persistableBundle) {
}
public void onStart() {
super.onStart();
}
}