Live Football Updates v1.0.1版本的 MD5 值为:636649089335ebb37514551724606ad0
以下内容为反编译后的 ModuleWebViewActivity.java 源代码,内容仅作参考
package com.applive.app.ui.activities.modules;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.CookieManager;
import android.webkit.DownloadListener;
import android.webkit.JsResult;
import android.webkit.URLUtil;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import android.widget.Toast;
import be.h;
import ck.f;
import ck.o;
import com.applive.app.ui.activities.DeepLinkActivity;
import com.applive.app.ui.activities.modules.ModuleWebViewActivity;
import com.ironsource.q2;
import com.millingoupdate.app.R;
import f7.d;
import i1.b1;
import i7.l;
import i7.r;
import i7.t;
import i7.u;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import o6.c;
import x6.v;
import x6.w;
import z3.g;
public class ModuleWebViewActivity extends x6.a {
public static String f4378j0 = "";
public FrameLayout V;
public WebView W;
public a X;
public ProgressBar Y;
public int Z;
public int f4379a0;
public int f4380b0;
public boolean f4381c0;
public String f0;
public String f4383g0;
public boolean d0 = true;
public boolean f4382e0 = false;
public final v f4384h0 = new v(this, 0);
public final w f4385i0 = new DownloadListener() {
@Override
public final void onDownloadStart(String str, String str2, String str3, String str4, long j4) {
String str5 = ModuleWebViewActivity.f4378j0;
ModuleWebViewActivity moduleWebViewActivity = ModuleWebViewActivity.this;
moduleWebViewActivity.getClass();
try {
if (!TextUtils.isEmpty(str)) {
if (moduleWebViewActivity.H0(moduleWebViewActivity, moduleWebViewActivity.L0())) {
moduleWebViewActivity.f0 = str;
} else {
i7.l.d(moduleWebViewActivity, str);
}
}
} catch (Exception unused) {
}
}
};
public class a extends d {
public a(View view, ViewGroup viewGroup) {
super(view, viewGroup);
}
@Override
public final boolean onJsAlert(WebView webView, String str, String str2, JsResult jsResult) {
return false;
}
@Override
public final void onProgressChanged(WebView webView, int i) {
ModuleWebViewActivity moduleWebViewActivity = ModuleWebViewActivity.this;
try {
moduleWebViewActivity.Y.setProgress(i);
if (i == 100) {
moduleWebViewActivity.Y.setVisibility(8);
} else {
moduleWebViewActivity.Y.setVisibility(0);
}
} catch (Exception unused) {
}
}
}
public static class b extends WebViewClient {
public final WeakReference<ModuleWebViewActivity> f4387a;
public b(ModuleWebViewActivity moduleWebViewActivity) {
this.f4387a = new WeakReference<>(moduleWebViewActivity);
}
@Override
public final void doUpdateVisitedHistory(WebView webView, String str, boolean z10) {
ModuleWebViewActivity moduleWebViewActivity = this.f4387a.get();
if (moduleWebViewActivity != null && !moduleWebViewActivity.isDestroyed() && !moduleWebViewActivity.isFinishing()) {
ModuleWebViewActivity.J0(moduleWebViewActivity, webView, str);
}
super.doUpdateVisitedHistory(webView, str, z10);
}
@Override
public final void onLoadResource(WebView webView, String str) {
ModuleWebViewActivity moduleWebViewActivity = this.f4387a.get();
if (moduleWebViewActivity != null && !moduleWebViewActivity.isDestroyed() && !moduleWebViewActivity.isFinishing()) {
String str2 = ModuleWebViewActivity.f4378j0;
try {
String z02 = x6.a.z0(x6.a.y0(moduleWebViewActivity.l0()));
if (!TextUtils.isEmpty(z02)) {
webView.evaluateJavascript(z02, null);
}
} catch (Exception unused) {
}
}
super.onLoadResource(webView, str);
}
@Override
public final void onPageFinished(WebView webView, String str) {
ModuleWebViewActivity moduleWebViewActivity = this.f4387a.get();
if (moduleWebViewActivity != null && !moduleWebViewActivity.isDestroyed() && !moduleWebViewActivity.isFinishing()) {
ModuleWebViewActivity.J0(moduleWebViewActivity, webView, str);
try {
String z02 = x6.a.z0(x6.a.y0(moduleWebViewActivity.l0()));
if (!TextUtils.isEmpty(z02)) {
webView.evaluateJavascript(z02, null);
}
} catch (Exception unused) {
}
try {
String z03 = x6.a.z0(x6.a.y0(moduleWebViewActivity.m0()));
if (!TextUtils.isEmpty(z03)) {
if (z03.startsWith("javascript:")) {
webView.loadUrl(z03);
} else {
webView.evaluateJavascript(z03, null);
}
}
} catch (Exception unused2) {
}
}
super.onPageFinished(webView, str);
}
@Override
public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
ModuleWebViewActivity moduleWebViewActivity = this.f4387a.get();
if (moduleWebViewActivity != null && !moduleWebViewActivity.isDestroyed() && !moduleWebViewActivity.isFinishing()) {
String str2 = ModuleWebViewActivity.f4378j0;
moduleWebViewActivity.H0(moduleWebViewActivity, moduleWebViewActivity.L0());
}
super.onPageStarted(webView, str, bitmap);
}
@Override
public final void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) {
ModuleWebViewActivity moduleWebViewActivity = this.f4387a.get();
if (moduleWebViewActivity != null && !moduleWebViewActivity.isDestroyed() && !moduleWebViewActivity.isFinishing()) {
String str = ModuleWebViewActivity.f4378j0;
webView.setBackgroundColor(moduleWebViewActivity.q0());
webView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public final boolean onLongClick(View view) {
String str2 = ModuleWebViewActivity.f4378j0;
return true;
}
});
try {
String z02 = x6.a.z0(ae.d.d().f("webview_error_javascript_json"));
if (!TextUtils.isEmpty(z02)) {
webView.evaluateJavascript(z02, null);
}
} catch (Exception unused) {
}
if (moduleWebViewActivity.d0 && !r.c(moduleWebViewActivity)) {
moduleWebViewActivity.d0 = false;
Toast.makeText(moduleWebViewActivity, moduleWebViewActivity.getString(R.string.error_msg_not_network_connection), 0).show();
}
}
super.onReceivedError(webView, webResourceRequest, webResourceError);
}
@Override
public final WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
ModuleWebViewActivity moduleWebViewActivity = this.f4387a.get();
if (moduleWebViewActivity != null && !moduleWebViewActivity.isDestroyed() && !moduleWebViewActivity.isFinishing()) {
String str = ModuleWebViewActivity.f4378j0;
return moduleWebViewActivity.G0(webResourceRequest);
}
return super.shouldInterceptRequest(webView, webResourceRequest);
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
String str;
List<String> list;
boolean z10;
String h10;
ModuleWebViewActivity moduleWebViewActivity = this.f4387a.get();
if (moduleWebViewActivity != null && !moduleWebViewActivity.isDestroyed() && !moduleWebViewActivity.isFinishing()) {
String uri = webResourceRequest.getUrl().toString();
String str2 = ModuleWebViewActivity.f4378j0;
String str3 = "android.intent.action.VIEW";
try {
str = new URL(uri).getHost();
} catch (Exception unused) {
str = uri;
}
boolean z11 = 1;
z11 = 1;
try {
h10 = u.h();
} catch (Exception unused2) {
}
if (!uri.startsWith("intent:") && !l.H(str, h10)) {
if (uri.startsWith(moduleWebViewActivity.getString(R.string.scheme_my_app))) {
DeepLinkActivity.A = true;
Intent intent = new Intent("android.intent.action.VIEW");
intent.addCategory("android.intent.category.BROWSABLE");
intent.setData(Uri.parse(uri));
intent.setPackage("com.millingoupdate.app");
intent.setFlags(65536);
moduleWebViewActivity.startActivity(intent);
return true;
}
List<String> list2 = null;
if (l.H(uri, moduleWebViewActivity.X())) {
if (moduleWebViewActivity.H0(moduleWebViewActivity, moduleWebViewActivity.L0())) {
moduleWebViewActivity.f4383g0 = uri;
return z11;
}
l.d(moduleWebViewActivity, uri);
moduleWebViewActivity.f4383g0 = null;
return z11;
}
if (l.H(uri, moduleWebViewActivity.h0())) {
c W = moduleWebViewActivity.W();
if (W != null && W.f27670n) {
z10 = z11;
} else {
z10 = false;
}
if (z10) {
Executors.newSingleThreadExecutor();
ExecutorService newFixedThreadPool = Executors.newFixedThreadPool(3);
new Handler(Looper.getMainLooper());
newFixedThreadPool.execute(new j1.b(moduleWebViewActivity, 11, uri));
return z11;
}
c W2 = moduleWebViewActivity.W();
if (W2 != null && W2.f27679x) {
str3 = z11;
} else {
str3 = null;
}
if (str3 != null) {
moduleWebViewActivity.N0(uri);
return z11;
}
} else {
c W3 = moduleWebViewActivity.W();
if (W3 != null && (list = W3.U) != null && !list.isEmpty()) {
list2 = W3.U;
}
if (!l.H(uri, x6.a.y0(list2))) {
try {
if (str.contains("instagram.com") || str.contains("twitter.com") || uri.startsWith("whatsapp://") || uri.startsWith("mailto:")) {
Intent intent2 = new Intent(str3, Uri.parse(uri));
if (str.contains("instagram.com")) {
intent2.setPackage("com.instagram.android");
if (!l.b(moduleWebViewActivity, intent2)) {
intent2.setPackage("com.instagram.lite");
}
} else if (str.contains("twitter.com")) {
intent2.setPackage("com.twitter.android");
if (!l.b(moduleWebViewActivity, intent2)) {
intent2.setPackage("com.twitter.android.lite");
}
} else if (uri.startsWith("whatsapp://")) {
intent2.setPackage("com.whatsapp");
if (!l.b(moduleWebViewActivity, intent2)) {
intent2.setPackage("com.whatsapp.w4b");
}
} else if (uri.startsWith("mailto:")) {
intent2 = new Intent("android.intent.action.SENDTO", Uri.parse("mailto:"));
}
intent2.setFlags(65536);
moduleWebViewActivity.startActivity(intent2);
return z11;
}
} catch (Exception unused3) {
}
} else {
return z11;
}
}
z11 = 0;
return false;
}
DeepLinkActivity.A = true;
Intent parseUri = Intent.parseUri(uri, 1);
parseUri.setFlags(65536);
moduleWebViewActivity.startActivity(parseUri);
return true;
}
return super.shouldOverrideUrlLoading(webView, webResourceRequest);
}
}
public static void J0(ModuleWebViewActivity moduleWebViewActivity, WebView webView, String str) {
if (!TextUtils.isEmpty(str.trim()) && str.startsWith("http")) {
String title = webView.getTitle();
Bundle bundle = new Bundle();
bundle.putString(q2.h.D0, title);
bundle.putString("b_url", str);
moduleWebViewActivity.I0(bundle);
if (str.equals(f4378j0) && moduleWebViewActivity.f4381c0) {
moduleWebViewActivity.f4381c0 = false;
webView.clearHistory();
}
}
}
public final f K0(String str, HashMap hashMap) throws IOException {
if (!hashMap.isEmpty()) {
ak.d b10 = zj.d.b(str);
b10.b(hashMap);
b10.f990a.f999h = true;
b10.c((int) TimeUnit.SECONDS.toMillis(120L));
return b10.a();
}
ak.d b11 = zj.d.b(str);
b11.f990a.f999h = true;
b11.c((int) TimeUnit.SECONDS.toMillis(120L));
return b11.a();
}
public final String L0() {
return ae.d.d().f("default_interstitial_ads_module_webview");
}
public final void M0(boolean z10) {
boolean z11;
WebView webView = this.W;
if (webView != null) {
if (z10) {
webView.reload();
return;
}
String f0 = f0();
c W = W();
boolean z12 = true;
if (W != null && W.f27669m) {
z11 = true;
} else {
z11 = false;
}
if (z11) {
Executors.newSingleThreadExecutor();
ExecutorService newFixedThreadPool = Executors.newFixedThreadPool(3);
new Handler(Looper.getMainLooper());
newFixedThreadPool.execute(new j1.b(this, 11, f0));
return;
}
c W2 = W();
if (W2 == null || !W2.f27677v) {
z12 = false;
}
if (z12) {
N0(f0);
return;
}
HashMap r02 = r0();
if (!r02.isEmpty()) {
this.W.loadUrl(f0, r02);
} else {
this.W.loadUrl(f0);
}
}
}
public final void N0(String str) {
String str2;
try {
String z02 = x6.a.z0(x6.a.y0(Z()));
String z03 = x6.a.z0(x6.a.y0(U()));
String z04 = x6.a.z0(x6.a.y0(Y()));
String z05 = x6.a.z0(x6.a.y0(V()));
f b10 = dk.f.a().b("<!doctype html><html style=\"height:100%;\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\"></head><body style=\"height:100%;margin:0;\">" + ("<iframe id=\"x-iframe\" style=\"display:block;border:none;height:100vh;width:100vw;\" src=\"" + str + "\" frameborder=\"0\" allowfullscreen allowtransparency></iframe>") + "</body></html>", "");
try {
b10.t0().i0(z04).d();
} catch (Exception unused) {
}
try {
b10.t0().Q(z02);
} catch (Exception unused2) {
}
try {
b10.q0().i0(z05).d();
} catch (Exception unused3) {
}
try {
o j02 = b10.q0().j0(z03);
if (j02 != null) {
b10.q0().Q("<div class='bodywrap_x'></div>");
j02.U(b10.q0().j0("div[class=bodywrap_x]"));
try {
b10.q0().j0("div[class=bodywrap_x]").m0().d();
} catch (Exception unused4) {
}
b10.q0().j0("div[class=bodywrap_x]").M();
}
} catch (Exception unused5) {
}
String c02 = b10.c0();
try {
URL url = new URL(str);
String T = T();
if (!TextUtils.isEmpty(T) && (URLUtil.isHttpsUrl(T) || URLUtil.isHttpUrl(T))) {
url = new URL(T);
}
str2 = url.getProtocol() + "://" + url.getHost();
} catch (Exception unused6) {
str2 = "https://example.com";
}
WebView webView = this.W;
if (webView != null) {
webView.loadDataWithBaseURL(str2, c02, "text/html", "UTF-8", null);
}
} catch (Exception unused7) {
}
}
@Override
public final int a0() {
return R.layout.activity_module_webview;
}
@Override
public final void onBackPressed() {
a aVar = this.X;
if (aVar == null || !aVar.a()) {
if (this.B) {
N(this);
return;
}
WebView webView = this.W;
if (webView != null && webView.canGoBack()) {
this.W.goBack();
return;
}
this.f4382e0 = true;
if (ae.d.d().c("show_interstitial_on_back_pressed") && H0(this, L0())) {
return;
}
super.onBackPressed();
l.y(this);
}
}
@Override
public void onClickModuleButton(View view) {
super.onClickModuleButton(view);
if (view.getId() == R.id.btnBack) {
this.f4382e0 = true;
if (H0(this, L0())) {
return;
}
finish();
} else if (view.getId() == R.id.btnHome) {
WebView webView = this.W;
if (webView != null && webView.canGoBack()) {
this.f4381c0 = true;
String str = f4378j0;
if (!TextUtils.isEmpty(str.trim()) && str.startsWith("http")) {
Bundle bundle = new Bundle();
bundle.putString("b_url", str);
I0(bundle);
}
M0(false);
}
} else if (view.getId() == R.id.btnRefresh) {
M0(true);
}
}
@Override
@SuppressLint({"SetJavaScriptEnabled"})
public final void onCreate(Bundle bundle) {
int i;
String p02;
c W;
c W2;
super.onCreate(bundle);
if (w0()) {
s0();
}
View findViewById = findViewById(R.id.nonVideoFullscreenLayout);
ViewGroup viewGroup = (ViewGroup) findViewById(R.id.videoFullscreenLayout);
this.V = (FrameLayout) findViewById(R.id.webViewContainer);
WebView webView = new WebView(getApplicationContext());
this.W = webView;
webView.setVerticalScrollBarEnabled(false);
this.W.setHorizontalScrollBarEnabled(false);
this.V.removeAllViews();
this.V.addView(this.W);
this.Y = (ProgressBar) findViewById(R.id.progress_bar);
boolean z10 = true;
((Button) findViewById(R.id.retry_btn)).setOnClickListener(new g(1, this));
CookieManager.getInstance().setAcceptCookie(true);
CookieManager.getInstance().setAcceptThirdPartyCookies(this.W, true);
WebView webView2 = this.W;
try {
W2 = W();
} catch (Exception unused) {
}
if (W2 != null && !TextUtils.isEmpty(W2.G)) {
i = Color.parseColor(W2.G);
webView2.setBackgroundColor(i);
this.W.setHapticFeedbackEnabled(false);
p02 = p0();
if (TextUtils.isEmpty(p02)) {
p02 = u.w(this);
if (TextUtils.isEmpty(p02)) {
p02 = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36";
}
}
if (!TextUtils.isEmpty(p02)) {
String d0 = d0();
String e02 = e0();
if (!TextUtils.isEmpty(d0) && !TextUtils.isEmpty(e02)) {
String p10 = l.p(d0, e02);
if (!TextUtils.isEmpty(p10)) {
p02 = h.d(p10, p02);
}
} else {
String j02 = j0();
if (!TextUtils.isEmpty(j02) && !p02.startsWith(j02)) {
p02 = h.d(j02, p02);
}
String k02 = k0();
if (!TextUtils.isEmpty(k02) && !p02.startsWith(k02)) {
p02 = h.d(p02, k02);
}
}
}
WebSettings settings = this.W.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
settings.setUserAgentString(p02);
settings.setDisplayZoomControls(false);
settings.setUseWideViewPort(true);
settings.setJavaScriptCanOpenWindowsAutomatically(false);
settings.setSupportMultipleWindows(false);
W = W();
if (W != null || !W.f27674r) {
z10 = false;
}
settings.setMediaPlaybackRequiresUserGesture(z10);
WebView.setWebContentsDebuggingEnabled(false);
a aVar = new a(findViewById, viewGroup);
this.X = aVar;
aVar.f22681f = new b1(8, this);
this.W.setWebChromeClient(aVar);
this.W.setWebViewClient(new b(this));
f4378j0 = f0();
M0(false);
O(L0());
E0(this, L0());
C0(ae.d.d().f("default_banner_ads_module_webview_top"), x6.a.u0(ae.d.d().f("default_banner_ads_module_webview_top")));
B0(ae.d.d().f("default_banner_ads_module_webview"), x6.a.u0(ae.d.d().f("default_banner_ads_module_webview")));
}
i = -1;
webView2.setBackgroundColor(i);
this.W.setHapticFeedbackEnabled(false);
p02 = p0();
if (TextUtils.isEmpty(p02)) {
}
if (!TextUtils.isEmpty(p02)) {
}
WebSettings settings2 = this.W.getSettings();
settings2.setJavaScriptEnabled(true);
settings2.setDomStorageEnabled(true);
settings2.setUserAgentString(p02);
settings2.setDisplayZoomControls(false);
settings2.setUseWideViewPort(true);
settings2.setJavaScriptCanOpenWindowsAutomatically(false);
settings2.setSupportMultipleWindows(false);
W = W();
if (W != null) {
}
z10 = false;
settings2.setMediaPlaybackRequiresUserGesture(z10);
WebView.setWebContentsDebuggingEnabled(false);
a aVar2 = new a(findViewById, viewGroup);
this.X = aVar2;
aVar2.f22681f = new b1(8, this);
this.W.setWebChromeClient(aVar2);
this.W.setWebViewClient(new b(this));
f4378j0 = f0();
M0(false);
O(L0());
E0(this, L0());
C0(ae.d.d().f("default_banner_ads_module_webview_top"), x6.a.u0(ae.d.d().f("default_banner_ads_module_webview_top")));
B0(ae.d.d().f("default_banner_ads_module_webview"), x6.a.u0(ae.d.d().f("default_banner_ads_module_webview")));
}
@Override
public final void onDestroy() {
t.W(this, this.f4384h0);
super.onDestroy();
try {
FrameLayout frameLayout = this.V;
if (frameLayout != null && this.W != null) {
frameLayout.removeAllViews();
this.W.clearHistory();
this.W.clearCache(true);
this.W.setWebChromeClient(null);
this.W.loadUrl("about:blank");
this.W.onPause();
this.W.removeAllViews();
this.W.destroyDrawingCache();
this.W.destroy();
this.W = null;
}
} catch (Exception unused) {
}
}
@Override
public final void onPause() {
super.onPause();
WebView webView = this.W;
if (webView != null) {
webView.onPause();
}
}
@Override
public final void onResume() {
super.onResume();
t.l(this, this.f4384h0);
WebView webView = this.W;
if (webView != null) {
webView.onResume();
this.W.setDownloadListener(this.f4385i0);
}
}
@Override
public final void onStop() {
super.onStop();
WebView webView = this.W;
if (webView != null) {
webView.setDownloadListener(null);
}
}
}