正在查看: Housing v14.7.8 应用的 Leegality.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Housing v14.7.8 应用的 Leegality.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.gspl.leegalitysdk;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.net.Uri;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.ValueCallback;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ProgressBar;
import androidx.core.content.ContextCompat;
import com.google.firebase.messaging.Constants;
import com.newrelic.agent.android.api.v2.TraceFieldInterface;
import com.newrelic.agent.android.background.ApplicationStateMonitor;
import com.newrelic.agent.android.instrumentation.Instrumented;
import com.newrelic.agent.android.tracing.Trace;
import com.newrelic.agent.android.tracing.TraceMachine;
import java.util.ArrayList;
@Instrumented
public class Leegality extends androidx.appcompat.app.i implements e, TraceFieldInterface {
private static final int FILE_INPUT_REQUEST_CODE = 100;
public Trace _nr_trace;
ValueCallback<Uri[]> mFilePathCallback;
ProgressBar progressBar;
j webAppInterface;
WebView webView;
public static class a {
static final int[] $SwitchMap$com$gspl$leegalitysdk$OTPType;
static {
int[] iArr = new int[f.values().length];
$SwitchMap$com$gspl$leegalitysdk$OTPType = iArr;
try {
iArr[f.SELF.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$gspl$leegalitysdk$OTPType[f.AADHAAR.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
}
}
public final void n(String str, f fVar) {
int i = a.$SwitchMap$com$gspl$leegalitysdk$OTPType[fVar.ordinal()];
if (i != 1) {
if (i != 2) {
return;
}
this.webView.loadUrl(a.n("javascript:window.onload = (function(){var inputElement = document.querySelector('input[id=\"otpValue\"]');if(inputElement){inputElement.value = \"", str, "\";}else{inputElement = document.querySelector('input[id=\"OTP\"]');if(inputElement){inputElement.value = \"", str, "\";}}}) ();"));
} else {
this.webView.loadUrl("javascript:window.onload = (function(){var inputElement = document.querySelector('input[name=\"otp\"]');if(inputElement){inputElement.value = \"" + str + "\";}}) ();");
}
}
public final void onActivityResult(int i, int i2, Intent intent) {
String dataString;
if (i != 100 || this.mFilePathCallback == null) {
super/*androidx.fragment.app.u*/.onActivityResult(i, i2, intent);
} else {
this.mFilePathCallback.onReceiveValue((i2 != -1 || intent == null || (dataString = intent.getDataString()) == null) ? null : new Uri[]{Uri.parse(dataString)});
this.mFilePathCallback = null;
}
}
public final void onCreate(Bundle bundle) {
TraceMachine.startTracing("Leegality");
try {
TraceMachine.enterMethod(this._nr_trace, "Leegality#onCreate", (ArrayList) null);
} catch (NoSuchFieldError unused) {
TraceMachine.enterMethod((Trace) null, "Leegality#onCreate", (ArrayList) null);
}
super/*androidx.fragment.app.u*/.onCreate(bundle);
setContentView(h.webview);
String stringExtra = getIntent().getStringExtra("url");
if (stringExtra == null || stringExtra.trim().length() <= 0) {
Intent intent = new Intent();
intent.putExtra(Constants.IPC_BUNDLE_KEY_SEND_ERROR, "url is required.");
setResult(-1, intent);
finish();
} else {
String[] strArr = {"android.permission.READ_SMS", "android.permission.RECEIVE_SMS"};
boolean z = true;
for (int i = 0; i < 2; i++) {
z = z && ContextCompat.checkSelfPermission(this, strArr[i]) == 0;
}
if (z) {
MessageReceiver.a(this);
}
String trim = stringExtra.trim();
String stringExtra2 = getIntent().getStringExtra("color");
String trim2 = (stringExtra2 == null || stringExtra2.trim().length() != 7) ? "#015187" : stringExtra2.trim();
this.webView = (WebView) findViewById(g.webView);
ProgressBar progressBar = (ProgressBar) findViewById(g.progressBar);
this.progressBar = progressBar;
progressBar.getIndeterminateDrawable().setColorFilter(Color.parseColor(trim2), PorterDuff.Mode.SRC_IN);
WebSettings settings = this.webView.getSettings();
settings.setUseWideViewPort(true);
settings.setLoadWithOverviewMode(true);
settings.setJavaScriptEnabled(true);
j jVar = new j(this);
this.webAppInterface = jVar;
this.webView.addJavascriptInterface(jVar, "MobileSDK");
this.webView.setWebViewClient(new d(this.progressBar, this));
this.webView.setWebChromeClient(new com.gspl.leegalitysdk.a(this));
this.webView.loadUrl(trim);
}
TraceMachine.exitMethod();
}
public final boolean onKeyDown(int i, KeyEvent keyEvent) {
if (i == 4) {
Intent intent = new Intent();
intent.putExtra(Constants.IPC_BUNDLE_KEY_SEND_ERROR, "Cancelled.");
setResult(-1, intent);
finish();
}
return super.onKeyDown(i, keyEvent);
}
public final void onStart() {
super.onStart();
ApplicationStateMonitor.getInstance().activityStarted();
}
public final void onStop() {
super.onStop();
ApplicationStateMonitor.getInstance().activityStopped();
}
}