正在查看: Clash Legends v0.0.1 应用的 PayUOtpAssistActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 PayUOtpAssistActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.payu.otpassist;
import android.app.AlertDialog;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.webkit.WebSettings;
import android.webkit.WebView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.MutableLiveData;
import com.payu.india.Payu.PayuConstants;
import com.payu.otpassist.javascriptinterface.PayUOtpAssistWebInterface;
import com.payu.payuanalytics.analytics.factory.AnalyticsFactory;
import com.payu.payuanalytics.analytics.model.AnalyticsType;
import com.payu.payuanalytics.analytics.model.BaseAnalytics;
import com.payu.payuanalytics.analytics.model.PayUAnalytics;
import com.payu.payuanalytics.analytics.utils.PayUAnalyticsConstant;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000h\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0011\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0015\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b3\u0010\bJ\u0019\u0010\u0005\u001a\u00020\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0014¢\u0006\u0004\b\u0005\u0010\u0006J\u000f\u0010\u0007\u001a\u00020\u0004H\u0016¢\u0006\u0004\b\u0007\u0010\bJ)\u0010\u000e\u001a\u00020\u00042\u0006\u0010\n\u001a\u00020\t2\u0006\u0010\u000b\u001a\u00020\t2\b\u0010\r\u001a\u0004\u0018\u00010\fH\u0014¢\u0006\u0004\b\u000e\u0010\u000fJ-\u0010\u0015\u001a\u00020\u00042\u0006\u0010\n\u001a\u00020\t2\f\u0010\u0012\u001a\b\u0012\u0004\u0012\u00020\u00110\u00102\u0006\u0010\u0014\u001a\u00020\u0013H\u0016¢\u0006\u0004\b\u0015\u0010\u0016J\u000f\u0010\u0017\u001a\u00020\u0004H\u0014¢\u0006\u0004\b\u0017\u0010\bR\u0018\u0010\u001b\u001a\u0004\u0018\u00010\u00188\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0019\u0010\u001aR\u0018\u0010\u001f\u001a\u0004\u0018\u00010\u001c8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001d\u0010\u001eR\u0016\u0010#\u001a\u00020 8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b!\u0010\"R\u0018\u0010'\u001a\u0004\u0018\u00010$8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b%\u0010&R\u0018\u0010+\u001a\u0004\u0018\u00010(8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b)\u0010*R\u0018\u0010.\u001a\u0004\u0018\u00010\u00118\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b,\u0010-R\u0018\u00102\u001a\u0004\u0018\u00010/8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b0\u00101¨\u00064"}, d2 = {"Lcom/payu/otpassist/PayUOtpAssistActivity;", "Landroidx/appcompat/app/AppCompatActivity;", "Landroid/os/Bundle;", "savedInstanceState", "", "onCreate", "(Landroid/os/Bundle;)V", "onBackPressed", "()V", "", "requestCode", PayuConstants.PAYU_RESULT_CODE, "Landroid/content/Intent;", "data", "onActivityResult", "(IILandroid/content/Intent;)V", "", "", "permissions", "", "grantResults", "onRequestPermissionsResult", "(I[Ljava/lang/String;[I)V", "onDestroy", "Lcom/payu/payuanalytics/analytics/model/PayUAnalytics;", "e", "Lcom/payu/payuanalytics/analytics/model/PayUAnalytics;", "payUAnalytics", "Landroid/app/AlertDialog;", "f", "Landroid/app/AlertDialog;", "alertDialog", "", PayUAnalyticsConstant.PA_CT_DATA_PARAM, "Z", "isWebFlow", "Lcom/payu/otpassist/viewmodel/a;", "b", "Lcom/payu/otpassist/viewmodel/a;", "viewModel", "Lcom/payu/otpassist/j;", "c", "Lcom/payu/otpassist/j;", "bottomSheet", "g", "Ljava/lang/String;", "postDataForIssuer", "Landroid/webkit/WebView;", "a", "Landroid/webkit/WebView;", "otpAssistWebView", "<init>", "payu-otp-assist-android_release"}, k = 1, mv = {1, 4, 2})
public final class PayUOtpAssistActivity extends AppCompatActivity {
public WebView otpAssistWebView;
public com.payu.otpassist.viewmodel.a viewModel;
public j bottomSheet;
public boolean isWebFlow;
public PayUAnalytics payUAnalytics;
public AlertDialog alertDialog;
public String postDataForIssuer;
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
FragmentManager supportFragmentManager = getSupportFragmentManager();
Intrinsics.checkNotNullExpressionValue(supportFragmentManager, "supportFragmentManager");
for (Fragment fragment : supportFragmentManager.getFragments()) {
if (fragment != null && (fragment instanceof j)) {
fragment.onActivityResult(requestCode, resultCode, data);
}
}
}
public void onBackPressed() {
if (!this.isWebFlow) {
Intrinsics.checkNotNullParameter(this, "activity");
Object systemService = getSystemService("input_method");
if (systemService == null) {
throw new NullPointerException("null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
}
InputMethodManager inputMethodManager = (InputMethodManager) systemService;
View currentFocus = getCurrentFocus();
if (currentFocus == null) {
currentFocus = new View(this);
}
inputMethodManager.hideSoftInputFromWindow(currentFocus.getWindowToken(), 0);
com.payu.otpassist.viewmodel.a aVar = j.I;
if (aVar == null) {
Intrinsics.throwUninitializedPropertyAccessException("viewModel");
}
if (aVar != null) {
aVar.d();
return;
}
return;
}
g gVar = new g(this);
if (isFinishing() || isDestroyed()) {
return;
}
String string = getString(R.string.payu_yes);
String string2 = getString(R.string.payu_no);
String string3 = getString(R.string.payu_do_you_really_want_to_cancel_the_payment);
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.PayU_Otp_Acs_Cancel_Dialog);
if (string3 != null) {
builder.setMessage(string3);
}
if (string != null) {
builder.setPositiveButton(string, gVar);
}
if (string2 != null) {
builder.setNegativeButton(string2, gVar);
}
AlertDialog create = builder.create();
this.alertDialog = create;
if (create != null) {
create.show();
}
}
public void onCreate(Bundle savedInstanceState) {
MutableLiveData<Boolean> mutableLiveData;
MutableLiveData<Boolean> mutableLiveData2;
MutableLiveData<String> mutableLiveData3;
MutableLiveData<String> mutableLiveData4;
MutableLiveData<String> mutableLiveData5;
MutableLiveData<String> mutableLiveData6;
Bundle extras;
Bundle extras2;
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pay_u_otp_assist);
Object obj = 0;
if (getIntent() != null) {
Intent intent = getIntent();
if ((intent != null ? intent.getExtras() : null) != null) {
Intent intent2 = getIntent();
if (((intent2 == null || (extras2 = intent2.getExtras()) == null) ? null : extras2.get("post_data")) != null) {
Context applicationContext = getApplicationContext();
Intrinsics.checkNotNullExpressionValue(applicationContext, "applicationContext");
BaseAnalytics analyticsClass = new AnalyticsFactory(applicationContext, obj, 2, obj).getAnalyticsClass(AnalyticsType.PAYU_ANALYTICS);
if (analyticsClass == null) {
throw new NullPointerException("null cannot be cast to non-null type com.payu.payuanalytics.analytics.model.PayUAnalytics");
}
this.payUAnalytics = (PayUAnalytics) analyticsClass;
Application application = getApplication();
Intrinsics.checkNotNullExpressionValue(application, "this.application");
PayUAnalytics payUAnalytics = this.payUAnalytics;
Intrinsics.checkNotNull(payUAnalytics);
com.payu.otpassist.viewmodel.a aVar = new com.payu.otpassist.viewmodel.a(application, payUAnalytics);
this.viewModel = aVar;
Intent intent3 = getIntent();
String string = (intent3 == null || (extras = intent3.getExtras()) == null) ? null : extras.getString("post_data");
Intrinsics.checkNotNull(string);
Intrinsics.checkNotNullExpressionValue(string, "intent?.extras?.getString(Constants.POST_DATA)!!");
aVar.c(string);
com.payu.otpassist.viewmodel.a aVar2 = this.viewModel;
if (aVar2 != null && (mutableLiveData6 = aVar2.c) != null) {
mutableLiveData6.observe(this, new a(this));
}
com.payu.otpassist.viewmodel.a aVar3 = this.viewModel;
if (aVar3 != null && (mutableLiveData5 = aVar3.b) != null) {
mutableLiveData5.observe(this, new b(this));
}
com.payu.otpassist.viewmodel.a aVar4 = this.viewModel;
if (aVar4 != null && (mutableLiveData4 = aVar4.m) != null) {
mutableLiveData4.observe(this, new c(this));
}
com.payu.otpassist.viewmodel.a aVar5 = this.viewModel;
if (aVar5 != null && (mutableLiveData3 = aVar5.a) != null) {
mutableLiveData3.observe(this, new d(this));
}
com.payu.otpassist.viewmodel.a aVar6 = this.viewModel;
if (aVar6 != null && (mutableLiveData2 = aVar6.o) != null) {
mutableLiveData2.observe(this, new e(this));
}
com.payu.otpassist.viewmodel.a aVar7 = this.viewModel;
if (aVar7 != null && (mutableLiveData = aVar7.f) != null) {
mutableLiveData.observe(this, new f(this));
}
com.payu.otpassist.viewmodel.a viewModel = this.viewModel;
Intrinsics.checkNotNull(viewModel);
PayUAnalytics payUAnalytics2 = this.payUAnalytics;
Intrinsics.checkNotNull(payUAnalytics2);
Intrinsics.checkNotNullParameter(viewModel, "viewModel");
Intrinsics.checkNotNullParameter(payUAnalytics2, "payUAnalytics");
Intrinsics.checkNotNullParameter(viewModel, "<set-?>");
j.I = viewModel;
j jVar = new j();
this.bottomSheet = jVar;
jVar.setCancelable(false);
j jVar2 = this.bottomSheet;
if (jVar2 != null) {
jVar2.show(getSupportFragmentManager(), "OtpAssistBottomSheet");
}
}
}
}
Intrinsics.checkNotNullParameter(this, "activity");
Object systemService = getSystemService("input_method");
if (systemService == null) {
throw new NullPointerException("null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
}
InputMethodManager inputMethodManager = (InputMethodManager) systemService;
View currentFocus = getCurrentFocus();
if (currentFocus == null) {
currentFocus = new View(this);
}
inputMethodManager.hideSoftInputFromWindow(currentFocus.getWindowToken(), 0);
WebView webView = (WebView) findViewById(R.id.otpAssistWebView);
this.otpAssistWebView = webView;
if (webView != null) {
WebSettings settings = webView.getSettings();
if (settings != null) {
settings.setJavaScriptEnabled(true);
}
PayUOtpAssistConfig payUOtpAssistConfig = i.b;
if (payUOtpAssistConfig == null || payUOtpAssistConfig.getWebInterface() == null) {
PayUOtpAssistWebInterface payUOtpAssistWebInterface = new PayUOtpAssistWebInterface();
payUOtpAssistWebInterface.setViewModel(this.viewModel);
payUOtpAssistWebInterface.setActivity(this);
WebView webView2 = this.otpAssistWebView;
if (webView2 != null) {
webView2.addJavascriptInterface(payUOtpAssistWebInterface, "PayU");
}
} else {
PayUOtpAssistConfig payUOtpAssistConfig2 = i.b;
if ((payUOtpAssistConfig2 != null ? payUOtpAssistConfig2.getWebInterface() : null) instanceof PayUOtpAssistWebInterface) {
PayUOtpAssistConfig payUOtpAssistConfig3 = i.b;
Object webInterface = payUOtpAssistConfig3 != null ? payUOtpAssistConfig3.getWebInterface() : null;
if (webInterface == null) {
throw new NullPointerException("null cannot be cast to non-null type com.payu.otpassist.javascriptinterface.PayUOtpAssistWebInterface");
}
PayUOtpAssistWebInterface payUOtpAssistWebInterface2 = (PayUOtpAssistWebInterface) webInterface;
payUOtpAssistWebInterface2.setActivity(this);
obj = payUOtpAssistWebInterface2;
} else {
PayUOtpAssistConfig payUOtpAssistConfig4 = i.b;
if (payUOtpAssistConfig4 != null) {
obj = payUOtpAssistConfig4.getWebInterface();
}
}
WebView webView3 = this.otpAssistWebView;
if (webView3 != null) {
Intrinsics.checkNotNull(obj);
webView3.addJavascriptInterface(obj, "PayU");
}
}
WebView webView4 = this.otpAssistWebView;
if (webView4 != null) {
webView4.setVisibility(8);
}
WebView webView5 = this.otpAssistWebView;
if (webView5 != null) {
webView5.setWebViewClient(new h(this));
}
}
}
public void onDestroy() {
super.onDestroy();
}
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
Intrinsics.checkNotNullParameter(permissions, "permissions");
Intrinsics.checkNotNullParameter(grantResults, "grantResults");
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
FragmentManager supportFragmentManager = getSupportFragmentManager();
Intrinsics.checkNotNullExpressionValue(supportFragmentManager, "supportFragmentManager");
for (Fragment fragment : supportFragmentManager.getFragments()) {
if (fragment != null && (fragment instanceof j)) {
fragment.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
}
}