正在查看: MX Player v1.97.8 应用的 ActivityAbout.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MX Player v1.97.8 应用的 ActivityAbout.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mxtech.videoplayer;
import android.R;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.widget.Toolbar;
import com.mx.buzzify.module.PosterInfo;
import com.mxtech.videoplayer.L;
import com.mxtech.videoplayer.ad.online.model.bean.next.ResourceType;
import com.mxtech.videoplayer.g;
import defpackage.ai0;
import defpackage.cti;
import defpackage.esg;
import defpackage.g1;
import defpackage.gif;
import defpackage.gl0;
import defpackage.h1;
import defpackage.i0g;
import defpackage.j1b;
import defpackage.kwd;
import defpackage.mfg;
import defpackage.rae;
import defpackage.tya;
import defpackage.woa;
import defpackage.xk4;
import defpackage.yh;
import defpackage.yki;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.regex.Pattern;
public class ActivityAbout extends yh {
public h1 R;
public WebView S;
public boolean T;
public class a implements View.OnClickListener {
public a() {
}
@Override
public final void onClick(View view) {
h1 h1Var = ActivityAbout.this.R;
Iterator it = h1Var.c.iterator();
while (it.hasNext()) {
((h1.a) it.next()).a++;
}
Handler handler = h1Var.d;
handler.removeCallbacksAndMessages(null);
handler.postDelayed(new g1(h1Var), 1500L);
}
}
public class b extends WebViewClient {
public b() {
try {
PackageInfo packageInfo = ActivityAbout.this.getPackageManager().getPackageInfo(ActivityAbout.this.getPackageName(), 0);
TypedArray obtainStyledAttributes = ActivityAbout.this.obtainStyledAttributes(rae.a);
try {
ActivityAbout.this.S = (WebView) ActivityAbout.this.findViewById(2131362817);
HashMap hashMap = new HashMap();
Resources resources = ActivityAbout.this.getResources();
int i = 32768;
byte[] bArr = new byte[32768];
InputStream openRawResource = ((j1b) resources).a.openRawResource(2131820544);
int i2 = 0;
int i3 = 0;
while (i > 0) {
try {
int read = openRawResource.read(bArr, i3, i);
if (read < 0) {
break;
}
i3 += read;
i -= read;
i2 += read;
} catch (Throwable th) {
openRawResource.close();
throw th;
}
}
String str = new String(bArr, 0, i2);
hashMap.put("direction", a() ? "rtl" : "ltr");
L.a i4 = L.i();
hashMap.put("cpu_arch", i4 != null ? i4.b : "Unknown");
hashMap.put(PosterInfo.PosterType.LABEL, resources.getString(packageInfo.applicationInfo.labelRes));
hashMap.put("change_log", resources.getString(2131886761));
hashMap.put("support", resources.getString(2131890607));
hashMap.put("support_content", resources.getString(2131890608));
hashMap.put("support_email_text", mfg.r(String.format(resources.getString(2131890609), gif.b()), String.format("mailto:%1$s", gif.b())));
hashMap.put("terms_of_service", resources.getString(2131890725));
tya tyaVar = tya.m;
hashMap.put("privacy_policy", kwd.b() ? resources.getString(2131889665) : resources.getString(2131889667));
hashMap.put(ResourceType.OTT_TAB_HOME, resources.getString(2131888189));
hashMap.put("home_url", resources.getString(2131888195));
hashMap.put("faq", resources.getString(2131887679));
hashMap.put("faq_url", resources.getString(2131887680));
hashMap.put("forum", resources.getString(2131887750));
hashMap.put("forum_url", resources.getString(2131887751));
hashMap.put("translation_project", resources.getString(2131890903));
hashMap.put("error_report", resources.getString(2131887614));
hashMap.put("thanks_to", resources.getString(2131890740));
hashMap.put("thanks_to_all", resources.getString(2131890741));
hashMap.put("open_source_license", resources.getString(2131886729));
hashMap.put("open_source_license_content", mfg.s());
hashMap.put("primary_text_color", String.format("#%06X", Integer.valueOf(obtainStyledAttributes.getColor(1, 0) & 16777215)));
hashMap.put("secondary_text_color", String.format("#%06X", Integer.valueOf(obtainStyledAttributes.getColor(2, 0) & 16777215)));
hashMap.put("line_color", String.format("#%06X", Integer.valueOf(16777215 & obtainStyledAttributes.getColor(0, 0))));
hashMap.put("display_fdb", "hidden");
StringBuilder sb = L.w;
sb.setLength(0);
sb.append(resources.getString(2131891094));
sb.append(' ');
sb.append(packageInfo.versionName);
hashMap.put("version", sb.toString());
((f) ActivityAbout.this.getApplication()).getClass();
String F6 = ActivityAbout.F6(ActivityAbout.this, str, "free");
if (tya.o.b.contains("custom_codec")) {
try {
g.a b = g.b();
sb.setLength(0);
sb.append(", ");
sb.append(resources.getString(2131887182).toLowerCase());
sb.append(' ');
sb.append(b.b);
hashMap.put("custom_codec_version", sb.toString());
} catch (Exception unused) {
}
}
StringBuilder sb2 = L.w;
sb2.setLength(0);
String string = resources.getString(2131891080);
String string2 = resources.getString(2131891079);
sb2.append("<b>");
sb2.append(string);
sb2.append("</b>");
sb2.append(" - ");
sb2.append(string2);
sb2.append("<br/>");
sb2.append("<br/>");
String[] stringArray = ((j1b) resources).b.getStringArray(2130903117);
String[] stringArray2 = ((j1b) resources).b.getStringArray(2130903116);
String[] stringArray3 = ((j1b) resources).b.getStringArray(2130903115);
if (stringArray.length == stringArray2.length && stringArray2.length == stringArray3.length) {
Locale locale = Locale.getDefault();
String locale2 = locale.toString();
String language = locale.getLanguage();
int length = stringArray.length;
ArrayList arrayList = new ArrayList(length);
for (int i5 = 0; i5 < length; i5++) {
arrayList.add(new c(stringArray[i5], stringArray2[i5], stringArray3[i5], locale2, language));
}
Collections.sort(arrayList);
((c) arrayList.get(0)).a(L.w, true);
for (int i6 = 1; i6 < length; i6++) {
((c) arrayList.get(i6)).a(L.w, false);
}
hashMap.put("translators", L.w.toString());
ActivityAbout.this.S.loadDataWithBaseURL("file:///android_asset/", mfg.h(F6, "%(", ")", hashMap), "text/html", "utf-8", null);
openRawResource.close();
ActivityAbout.this.S.setBackgroundColor(0);
ActivityAbout.this.S.setWebViewClient(this);
return;
}
Log.e("MX.About", "translator_names=" + stringArray.length + " translator_languages=" + stringArray2.length + " translator_codes=" + stringArray3.length);
openRawResource.close();
} finally {
obtainStyledAttributes.recycle();
}
} catch (Exception e) {
Log.e("MX.About", "", e);
}
}
public static boolean a() {
Locale locale = Locale.getDefault();
try {
s6d.X();
Locale[] localeArr = s6d.I1;
s6d.X();
String[] strArr = s6d.J1;
locale.toString();
for (int i = 0; i < localeArr.length; i++) {
if (woa.a(localeArr[i], locale)) {
return woa.c(strArr[i]);
}
}
String language = locale.getLanguage();
for (int i2 = 0; i2 < localeArr.length; i2++) {
if (localeArr[i2].getLanguage().equals(language)) {
return woa.c(strArr[i2]);
}
}
} catch (Exception e) {
Log.e("MX.About", "", e);
}
return woa.c(locale.getDisplayName());
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
boolean startsWith = str.startsWith("text:");
?? r4 = ActivityAbout.this;
if (!startsWith) {
try {
r4.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
} catch (Exception e) {
Log.e("MX.About", "", e);
}
} else if (!r4.isFinishing() && "open_source_license".equals(str.substring(5))) {
try {
r4.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(r4.getString(2131889427))));
} catch (Exception e2) {
Log.e("MX.About", "", e2);
}
}
return true;
}
}
public static class c implements Comparable<c> {
public final String b;
public final String c;
public final int d;
public c(String str, String str2, String str3, String str4, String str5) {
this.b = str;
this.c = str2;
this.d = str4.equals(str3) ? -2 : str5.equals(str3) ? -1 : 0;
}
public final void a(StringBuilder sb, boolean z) {
String str = this.b;
String[] split = str.split("\\|");
if (split.length == 2) {
str = z ? split[0] : split[1];
}
int indexOf = str.indexOf(58);
if (indexOf == str.length() - 2) {
r2 = str.charAt(indexOf + 1) == 'p' ? 2131889773 : 2131890902;
str = str.substring(0, indexOf);
}
if (str.charAt(0) == '<') {
sb.append(str);
} else {
i7.e(sb, "<b>", str, "</b>");
}
sb.append(" - ");
sb.append(mfg.o(r2, this.c));
sb.append("<br/>");
}
@Override
public final int compareTo(c cVar) {
return this.d - cVar.d;
}
}
public static String F6(ActivityAbout activityAbout, String str, String str2) {
activityAbout.getClass();
StringBuilder sb = L.w;
sb.setLength(0);
sb.append("\\<\\%");
sb.append(str2);
sb.append("(.+?)\\%\\>");
return Pattern.compile("\\<\\%.+?\\%\\>", 32).matcher(Pattern.compile(sb.toString(), 32).matcher(str).replaceAll("$1")).replaceAll("");
}
@Override
public int C6() {
int h = i0g.b().h("online_activity_media_list");
return h > 0 ? h : s6d.N();
}
@Override
public final void h6(int i) {
boolean e = gl0.e(this);
this.T = e;
if (!e || xk4.g) {
super.h6(i);
return;
}
Toolbar a2 = ai0.a(this);
if (a2 != null) {
setSupportActionBar(a2);
}
}
@Override
@SuppressLint({"MissingSuperCall"})
public void onCreate(Bundle bundle) {
if (Build.VERSION.SDK_INT >= 27) {
getWindow().setNavigationBarColor(((j1b) getResources()).a.getColor(R.color.white));
}
D6(2131558428, bundle);
if (this.T && !xk4.g) {
esg.a(this);
}
if (this.u != null) {
this.R = new h1(this);
this.u.setOnClickListener(new a());
tya tyaVar = tya.m;
}
new b();
}
@Override
public final void onDestroy() {
super.onDestroy();
h1 h1Var = this.R;
if (h1Var != null) {
h1Var.d.removeCallbacksAndMessages(null);
h1.b bVar = h1Var.b;
if (bVar != null) {
try {
bVar.dismiss();
} catch (Exception unused) {
}
h1Var.b = null;
}
}
yki.d(this.S);
this.S.destroy();
this.S = null;
}
public final void onRestart() {
super/*android.app.Activity*/.onRestart();
}
@Override
public final void onStart() {
super.onStart();
synchronized (cti.class) {
}
}
@Override
public final void onStop() {
super.onStop();
synchronized (cti.class) {
}
}
}