Live Football Updates v1.0版本的 MD5 值为:95609b5a5bec0a5f5a0b6e8e4d8f1cba
以下内容为反编译后的 r.java 源代码,内容仅作参考
package x6;
import android.annotation.SuppressLint;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.CookieManager;
import android.webkit.JavascriptInterface;
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.FrameLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.d;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.millingoupdate.app.R;
import java.lang.ref.WeakReference;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import w1.y0;
import x6.r;
@SuppressLint({"SetJavaScriptEnabled"})
public abstract class r extends x6.a implements SwipeRefreshLayout.f {
public static final int f33574g0 = 0;
public SwipeRefreshLayout V;
public FrameLayout W;
public WebView X;
public a Y;
public FrameLayout Z;
public int f33575a0;
public int f33576b0;
public int f33577c0;
public boolean f33578e0;
public boolean d0 = true;
public final m f0 = new m(1, this);
public class a extends f7.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) {
}
}
public static class b {
public final WeakReference<r> f33579a;
public b(r rVar) {
this.f33579a = new WeakReference<>(rVar);
}
public final void a(String str) {
r rVar = this.f33579a.get();
if (rVar != null && !rVar.isDestroyed() && !rVar.isFinishing()) {
i7.l.d(rVar, String.format("https://youtu.be/%s", str));
}
}
@JavascriptInterface
public void notifyUI(final int i, final String str) {
final r rVar = this.f33579a.get();
if (rVar != null && !rVar.isDestroyed() && !rVar.isFinishing()) {
rVar.runOnUiThread(new Runnable() {
@Override
public final void run() {
r.b bVar = r.b.this;
bVar.getClass();
int i10 = i;
r rVar2 = rVar;
if (i10 == -100) {
String str2 = str;
if (!TextUtils.isEmpty(str2)) {
if (str2.contains("101") || str2.contains("150")) {
String t = i7.l.t(rVar2.A.getString("b_url"));
String f0 = rVar2.f0();
if (TextUtils.isEmpty(t)) {
t = i7.l.t(i7.l.a(f0));
}
try {
f0 = Uri.parse(f0).getQueryParameter("channel");
} catch (Exception unused) {
}
if (!TextUtils.isEmpty(f0) && f0.startsWith("UC")) {
r rVar3 = bVar.f33579a.get();
if (rVar3 != null && !rVar3.isDestroyed() && !rVar3.isFinishing()) {
if (!rVar3.f33578e0) {
rVar3.f33578e0 = true;
return;
}
String t10 = i7.l.t(rVar3.A.getString("b_url"));
if (!TextUtils.isEmpty(t10) && !t10.equalsIgnoreCase("live_stream") && t10.length() == 11) {
bVar.a(t10);
} else {
i7.l.d(rVar3, String.format("https://www.youtube.com/channel/%s", f0));
}
}
} else if (!TextUtils.isEmpty(t) && !t.equalsIgnoreCase("live_stream") && t.length() == 11) {
rVar2.f33578e0 = true;
bVar.a(t);
}
}
}
} else if (i10 != 0) {
if (i10 == 1) {
int i11 = r.f33574g0;
rVar2.getClass();
}
} else {
int i12 = r.f33574g0;
rVar2.getClass();
}
}
});
}
}
}
public static class c extends WebViewClient {
public final WeakReference<r> f33580a;
public c(r rVar) {
this.f33580a = new WeakReference<>(rVar);
}
@Override
public final void onLoadResource(WebView webView, String str) {
FrameLayout frameLayout;
r rVar = this.f33580a.get();
if (rVar != null && !rVar.isDestroyed() && !rVar.isFinishing()) {
String f10 = ae.d.d().f("youtube_url_contains_json");
if (TextUtils.isEmpty(f10)) {
f10 = "{\"items\":[\"googlevideo\",\"videoplayback\"]}";
}
if (i7.l.H(str, f10) && (frameLayout = rVar.Z) != null) {
frameLayout.setVisibility(8);
}
try {
String z02 = x6.a.z0(x6.a.y0(rVar.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) {
long j4;
r rVar = this.f33580a.get();
if (rVar != null && !rVar.isDestroyed() && !rVar.isFinishing()) {
FrameLayout frameLayout = rVar.Z;
if (frameLayout != null) {
frameLayout.setVisibility(8);
}
try {
String z02 = x6.a.z0(x6.a.y0(rVar.l0()));
if (!TextUtils.isEmpty(z02)) {
webView.evaluateJavascript(z02, null);
}
} catch (Exception unused) {
}
try {
String z03 = x6.a.z0(x6.a.y0(rVar.m0()));
if (!TextUtils.isEmpty(z03)) {
webView.evaluateJavascript(z03, null);
}
} catch (Exception unused2) {
}
Handler handler = new Handler();
y0 y0Var = new y0(rVar, 13, webView);
o6.c W = rVar.W();
if (W != null) {
j4 = W.f27676z;
} else {
j4 = 1000;
}
handler.postDelayed(y0Var, j4);
}
super.onPageFinished(webView, str);
}
@Override
public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
FrameLayout frameLayout;
r rVar = this.f33580a.get();
if (rVar != null && !rVar.isDestroyed() && !rVar.isFinishing() && (frameLayout = rVar.Z) != null) {
frameLayout.setVisibility(0);
}
super.onPageStarted(webView, str, bitmap);
}
@Override
public final void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) {
r rVar = this.f33580a.get();
if (rVar != null && !rVar.isDestroyed() && !rVar.isFinishing()) {
webView.setBackgroundColor(rVar.q0());
webView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public final boolean onLongClick(View view) {
int i = r.f33574g0;
return true;
}
});
if (rVar.d0 && !i7.r.c(rVar)) {
rVar.d0 = false;
Toast.makeText(rVar, rVar.getString(R.string.error_msg_not_network_connection), 0).show();
}
}
super.onReceivedError(webView, webResourceRequest, webResourceError);
}
@Override
public final WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
r rVar = this.f33580a.get();
if (rVar != null && !rVar.isDestroyed() && !rVar.isFinishing()) {
int i = r.f33574g0;
return rVar.G0(webResourceRequest);
}
return super.shouldInterceptRequest(webView, webResourceRequest);
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
r rVar = this.f33580a.get();
if (rVar != null && !rVar.isDestroyed() && !rVar.isFinishing()) {
String uri = webResourceRequest.getUrl().toString();
if (i7.l.H(uri, rVar.X())) {
i7.l.d(rVar, uri);
return true;
}
return true ^ i7.l.H(uri, rVar.h0());
}
return super.shouldOverrideUrlLoading(webView, webResourceRequest);
}
}
public final void J0() {
boolean z10;
FrameLayout frameLayout = this.Z;
if (frameLayout != null) {
frameLayout.setVisibility(0);
}
String f0 = f0();
o6.c W = W();
if (W != null && W.f27673w) {
z10 = true;
} else {
z10 = false;
}
if (z10) {
String a10 = i7.l.a(f0);
jk.a.a("r").a("loadIFrameData() url = %s", a10);
String f10 = ae.d.d().f("youtube_iframe_api_url");
if (TextUtils.isEmpty(f10)) {
f10 = "https://www.youtube.com/iframe_api";
}
ck.f b10 = dk.f.a().b("<!DOCTYPE html><html><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\"><link rel=\"stylesheet\" type=\"text/css\" href=\"file:///android_asset/style_video.css\"><script src=\"" + f10 + "\"></script><script>var player;function onYouTubeIframeAPIReady() { player = new YT.Player('player', { events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange, 'onError': onPlayerError } });}function onPlayerReady(event) { event.target.playVideo();}function onPlayerStateChange(event) { notifyUI(event.data);}function onPlayerError(event) { notifyUI(-100, event.data);}function notifyUI(state, errorMessage) { if (window.MyJsInterface && window.MyJsInterface.notifyUI) { window.MyJsInterface.notifyUI(state, errorMessage); }}</script></head><body><div class=\"bodywrap_x\"><div class=\"content_x\"><div class=\"videoBox widescreen vimeo\"><iframe id=\"player\" src=\"" + a10 + "\" frameborder=\"0\" allowfullscreen></iframe></div></div></div></body></html>", "");
ck.o j02 = b10.q0().j0("iframe");
if (j02 != null && j02.s() && ((ck.o) j02.f4313a).f4294d.f21828a.equals("div")) {
((ck.o) j02.f4313a).e("style", "background-color: #000;");
}
String c02 = b10.c0();
String str = "https://www.youtube.com/";
try {
URL url = new URL("https://www.youtube.com/");
String T = T();
if (!TextUtils.isEmpty(T) && (URLUtil.isHttpsUrl(T) || URLUtil.isHttpUrl(T))) {
url = new URL(T);
}
str = url.getProtocol() + "://" + url.getHost();
} catch (Exception unused) {
}
String str2 = str;
WebView webView = this.X;
if (webView != null) {
webView.loadDataWithBaseURL(str2, c02, "text/html", "UTF-8", null);
return;
}
return;
}
HashMap r02 = r0();
if (!r02.isEmpty()) {
this.X.loadUrl(f0, r02);
} else {
this.X.loadUrl(f0);
}
}
@Override
public final int a0() {
return R.layout.activity_player_youtube_web;
}
@Override
public final void onBackPressed() {
a aVar = this.Y;
if (aVar == null || !aVar.a()) {
if (!this.B) {
super.onBackPressed();
} else {
N(this);
}
}
}
@Override
public void onClickModuleButton(View view) {
List<o6.c> g02;
super.onClickModuleButton(view);
if (view.getId() == R.id.server_btn && (g02 = g0()) != null && !g02.isEmpty()) {
String[] strArr = new String[g02.size()];
for (int i = 0; i < g02.size(); i++) {
strArr[i] = i0(g02.get(i));
}
final int i10 = x6.a.U;
d.a aVar = new d.a(this);
String string = getString(R.string.dialog_server_title);
SpannableStringBuilder r10 = i7.l.r(this, string, getString(R.string.dialog_server_message));
if (r10 != null) {
TextView textView = new TextView(this);
int f10 = i7.l.f(this, 22.0f);
textView.setPadding(f10, f10, f10, 0);
textView.setText(r10);
aVar.f1110a.f1084e = textView;
TypedValue typedValue = new TypedValue();
getTheme().resolveAttribute(R.attr.appTextColorPrimary, typedValue, true);
textView.setTextColor(typedValue.data);
} else {
aVar.setTitle(string);
}
aVar.a(strArr, i10, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i11) {
r rVar = r.this;
rVar.getClass();
if (!Objects.equals(Integer.valueOf(i10), Integer.valueOf(i11))) {
rVar.C = false;
List<o6.c> g03 = rVar.g0();
if (g03 != null && !g03.isEmpty() && !rVar.C) {
WebView webView = rVar.X;
if (webView != null) {
webView.stopLoading();
}
rVar.C = true;
String b02 = rVar.b0();
a.U = i11;
if (Objects.equals(b02, rVar.b0())) {
rVar.J0();
} else {
rVar.F0(rVar.M());
}
}
}
dialogInterface.dismiss();
}
});
aVar.create().show();
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
SwipeRefreshLayout swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_layout);
this.V = swipeRefreshLayout;
swipeRefreshLayout.setColorSchemeResources(i7.l.s(this, true));
this.V.setProgressBackgroundColorSchemeResource(i7.l.s(this, false));
this.V.setOnRefreshListener(this);
this.Z = (FrameLayout) findViewById(R.id.progressContainer);
this.W = (FrameLayout) findViewById(R.id.webViewContainer);
this.X = new WebView(getApplicationContext());
this.W.removeAllViews();
this.W.addView(this.X);
CookieManager.getInstance().setAcceptCookie(true);
CookieManager.getInstance().setAcceptThirdPartyCookies(this.X, true);
WebSettings settings = this.X.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
settings.setBuiltInZoomControls(false);
settings.setDisplayZoomControls(false);
settings.setLoadsImagesAutomatically(true);
settings.setMediaPlaybackRequiresUserGesture(false);
this.X.setBackgroundColor(-16777216);
this.X.setHapticFeedbackEnabled(false);
this.X.setOnLongClickListener(new l(1));
WebView.setWebContentsDebuggingEnabled(false);
a aVar = new a(findViewById(R.id.nonVideoFullscreenLayout), (ViewGroup) findViewById(R.id.videoFullscreenLayout));
this.Y = aVar;
aVar.f22676f = new d7.o(3, this);
if (x0()) {
this.X.setWebChromeClient(this.Y);
}
this.X.addJavascriptInterface(new b(this), "MyJsInterface");
this.X.setWebViewClient(new c(this));
J0();
B0(ae.d.d().f("default_banner_ads_module_yt"), x6.a.u0(ae.d.d().f("default_banner_ads_module_yt")));
}
@Override
public final void onDestroy() {
i7.t.W(this, this.f0);
super.onDestroy();
try {
FrameLayout frameLayout = this.W;
if (frameLayout != null && this.X != null) {
frameLayout.removeAllViews();
this.X.clearHistory();
this.X.clearCache(true);
this.X.setWebChromeClient(null);
this.X.loadUrl("about:blank");
this.X.onPause();
this.X.removeAllViews();
this.X.destroyDrawingCache();
this.X.destroy();
this.X = null;
}
} catch (Exception unused) {
}
}
@Override
public final void onPause() {
super.onPause();
WebView webView = this.X;
if (webView != null) {
webView.onPause();
}
}
@Override
public final void onRestart() {
super.onRestart();
if (this.f33578e0) {
onBackPressed();
}
}
@Override
public final void onResume() {
super.onResume();
i7.t.l(this, this.f0);
WebView webView = this.X;
if (webView != null) {
webView.onResume();
}
}
}