正在查看: Clash Legends v0.0.1 应用的 CBActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 CBActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.payu.custombrowser;
import android.app.NotificationManager;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
import com.onesignal.core.internal.database.impl.OneSignalDbContract;
import com.payu.custombrowser.bean.CustomBrowserConfig;
import com.payu.custombrowser.c;
import java.util.ArrayList;
import java.util.Iterator;
import org.json.JSONException;
public class CBActivity extends AppCompatActivity implements c.b {
protected static ArrayAdapter f;
public static int g;
protected static View h;
protected static View i;
CustomBrowserConfig a;
private Bank b;
private AlertDialog c;
private android.app.AlertDialog d;
com.payu.custombrowser.util.c e;
private void b() {
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.LayoutParams layoutParams = new DrawerLayout.LayoutParams(-1, -1);
layoutParams.gravity = 8388611;
if (listView.getParent() != null) {
((ViewGroup) listView.getParent()).removeView(listView);
}
findViewById.addView(listView);
listView.setLayoutParams(layoutParams);
listView.setAdapter((ListAdapter) f);
com.payu.custombrowser.bean.b.SINGLETON.getPayuCustomBrowserCallback().getNavigationDrawerObject(findViewById);
}
@Override
public void a() {
this.b.a("user_input", "review_order_close_click");
}
public void cbSetToolBar(View view) {
if (view == null || getSupportActionBar() == null) {
if (getSupportActionBar() != null) {
getSupportActionBar().hide();
}
} else {
getSupportActionBar().setDisplayShowTitleEnabled(false);
if (view.getParent() != null) {
((ViewGroup) view.getParent()).removeView(view);
}
getSupportActionBar().setCustomView(view, new ActionBar.LayoutParams(-1, -1));
getSupportActionBar().setDisplayShowCustomEnabled(true);
view.getParent().setContentInsetsAbsolute(0, 0);
}
}
protected void onActivityResult(int i2, int i3, Intent intent) {
super.onActivityResult(i2, i3, intent);
Iterator it = getSupportFragmentManager().getFragments().iterator();
while (it.hasNext()) {
((Fragment) it.next()).onActivityResult(i2, i3, intent);
}
}
public void onBackPressed() {
CustomBrowserConfig customBrowserConfig = this.a;
if (customBrowserConfig != null && customBrowserConfig.getDisableBackButtonDialog() != 1) {
this.b.a("user_input", "payu_back_button".toLowerCase());
this.b.showBackButtonDialog();
return;
}
this.b.a("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();
}
protected void onCreate(Bundle bundle) {
super.onCreate((Bundle) null);
setContentView(R.layout.cb_payments);
this.b = new Bank();
this.e = new com.payu.custombrowser.util.c();
Bundle bundle2 = new Bundle();
CustomBrowserConfig customBrowserConfig = (CustomBrowserConfig) getIntent().getParcelableExtra("cb_config");
this.a = customBrowserConfig;
customBrowserConfig.setProgressDialogCustomView(i);
this.e.b(this.a);
ArrayList<? extends Parcelable> parcelableArrayListExtra = getIntent().getParcelableArrayListExtra(com.payu.custombrowser.util.b.ORDER_DETAILS);
bundle2.putParcelable("cb_config", this.a);
if (parcelableArrayListExtra != null) {
bundle2.putParcelableArrayList(com.payu.custombrowser.util.b.ORDER_DETAILS, parcelableArrayListExtra);
}
this.b.setArguments(bundle2);
cbSetToolBar(h);
b();
getSupportFragmentManager().beginTransaction().add(R.id.main_frame, this.b).commit();
}
public void onDestroy() {
android.app.AlertDialog alertDialog = this.d;
if (alertDialog != null && alertDialog.isShowing()) {
this.d.dismiss();
this.d.cancel();
}
AlertDialog alertDialog2 = this.c;
if (alertDialog2 != null && alertDialog2.isShowing()) {
this.c.dismiss();
this.c.cancel();
}
g = 3;
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);
}
i = null;
h = null;
NotificationManager notificationManager = (NotificationManager) getSystemService(OneSignalDbContract.NotificationTable.TABLE_NAME);
if (notificationManager != null) {
notificationManager.cancel(com.payu.custombrowser.util.b.SNOOZE_NOTIFICATION_ID);
}
notificationManager.cancel(63);
super.onDestroy();
}
protected void onNewIntent(Intent intent) {
Bank bank;
super.onNewIntent(intent);
if (intent == null || !intent.getStringExtra(com.payu.custombrowser.util.b.SENDER).contentEquals(com.payu.custombrowser.util.b.SNOOZE_SERVICE) || (bank = this.b) == null) {
return;
}
bank.killSnoozeService();
this.b.dismissSnoozeWindow();
Bank bank2 = this.b;
bank2.a0 = null;
bank2.Z = false;
if (intent.getExtras() == null || !intent.getExtras().getBoolean(com.payu.custombrowser.util.b.VERIFICATION_MSG_RECEIVED)) {
this.b.a("internet_restored_notification_click", "-1");
this.b.resumeTransaction(intent);
return;
}
try {
if (this.e.b(intent.getExtras().getString("payu_response"), getString(R.string.cb_snooze_verify_api_status)).equalsIgnoreCase(com.payu.custombrowser.util.b.TRANSACTION_STATUS_SUCCESS)) {
this.b.a("transaction_verified_notification_click", "-1");
} else {
this.b.a("transaction_not_verified_notification_click", "-1");
}
} catch (JSONException e) {
e.printStackTrace();
}
this.b.showTransactionStatusDialog(intent.getExtras().getString("payu_response"), true);
}
protected void onPause() {
super.onPause();
g = 2;
}
public void onRequestPermissionsResult(int i2, String[] strArr, int[] iArr) {
super.onRequestPermissionsResult(i2, strArr, iArr);
Iterator it = getSupportFragmentManager().getFragments().iterator();
while (it.hasNext()) {
((Fragment) it.next()).onRequestPermissionsResult(i2, strArr, iArr);
}
}
protected void onResume() {
super.onResume();
g = 1;
}
protected void onStart() {
super.onStart();
}
}