App use time v13.1.5版本的 MD5 值为:b5d383003a7d5e6152ddd87dc8f5f38c
以下内容为反编译后的 a.java 源代码,内容仅作参考
package p1;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.util.ArrayMap;
import c9.r;
import c9.u;
import c9.v;
import c9.w;
import c9.x;
import c9.y;
import c9.z;
import com.coloros.digitalwellbeing.DigitalWellBeingApp;
import com.google.gson.f;
import com.google.gson.g;
import com.oplus.smartenginehelper.ParserTag;
import java.io.IOException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import n9.d;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import p2.k;
import u1.b;
public class a {
private static volatile a f12688b;
private f f12689a = new g().d().c();
public class C0164a implements X509TrustManager {
C0164a() {
}
private void a(X509Certificate[] x509CertificateArr, String str) throws CertificateException {
if (x509CertificateArr == null) {
q1.a.i("DigitalNetWorks", "chain is null!");
return;
}
for (X509Certificate x509Certificate : x509CertificateArr) {
try {
x509Certificate.checkValidity();
x509Certificate.verify(x509Certificate.getPublicKey());
} catch (Throwable unused) {
}
}
}
@Override
public void checkClientTrusted(X509Certificate[] x509CertificateArr, String str) throws CertificateException {
a(x509CertificateArr, str);
}
@Override
public void checkServerTrusted(X509Certificate[] x509CertificateArr, String str) throws CertificateException {
a(x509CertificateArr, str);
}
@Override
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0];
}
}
private a() {
}
private String c(List<String> list) {
StringBuilder sb;
if (k(DigitalWellBeingApp.i()) && l(DigitalWellBeingApp.i())) {
String valueOf = String.valueOf(System.currentTimeMillis());
StringBuilder sb2 = new StringBuilder();
sb2.append("e6e3f0c2f147cceb");
sb2.append("b619ee4de932fa420360f6ec7621da39");
sb2.append(valueOf);
sb2.append("/security/app-summarys/type");
sb2.append(sb2.length());
z zVar = null;
try {
try {
r d10 = new r.a().a("oak", "e6e3f0c2f147cceb").a("sign", b.f(sb2.toString())).a("t", valueOf).a("ch", "2607").a("mobile", Uri.encode(Build.MODEL, "UTF-8")).a("os", Uri.encode(b.d(), "UTF-8")).a("androidos", Uri.encode(b.b(), "UTF-8")).d();
ArrayMap arrayMap = new ArrayMap();
arrayMap.put("pkgs", list);
String r9 = e().r(arrayMap);
q1.a.b("DigitalNetWorks", "params json:" + r9);
zVar = a(new x.a().h("https://api.open.oppomobile.com/security/app-summarys/type").c(d10).e(y.c(u.e("application/json;charset=utf-8"), r9)).a());
} catch (Exception e10) {
q1.a.d("DigitalNetWorks", "getGamePackage:" + e10.getMessage());
if (zVar != null) {
try {
zVar.close();
} catch (Exception e11) {
e = e11;
sb = new StringBuilder();
sb.append("response:");
sb.append(e.getMessage());
q1.a.d("DigitalNetWorks", sb.toString());
return "";
}
}
}
if (zVar != null && zVar.h() != null) {
q1.a.b("DigitalNetWorks", "response:" + zVar.v() + ":" + zVar.V() + ":" + zVar.h());
if (zVar.E()) {
String C = zVar.h().C();
try {
zVar.close();
} catch (Exception e12) {
q1.a.d("DigitalNetWorks", "response:" + e12.getMessage());
}
return C;
}
try {
zVar.close();
} catch (Exception e13) {
e = e13;
sb = new StringBuilder();
sb.append("response:");
sb.append(e.getMessage());
q1.a.d("DigitalNetWorks", sb.toString());
return "";
}
return "";
}
return "";
} finally {
if (zVar != null) {
try {
zVar.close();
} catch (Exception e14) {
q1.a.d("DigitalNetWorks", "response:" + e14.getMessage());
}
}
}
}
return "";
}
public static String d(List<String> list) {
return f().c(list);
}
public static f e() {
return f().f12689a;
}
public static a f() {
if (f12688b == null) {
synchronized (a.class) {
if (f12688b == null) {
f12688b = new a();
}
}
}
return f12688b;
}
private static String g() {
return "https://ilighthouse.apps.coloros.com";
}
private static SSLSocketFactory h(TrustManager trustManager) {
try {
SSLContext sSLContext = SSLContext.getInstance("SSL");
sSLContext.init(null, new TrustManager[]{trustManager}, new SecureRandom());
return sSLContext.getSocketFactory();
} catch (Exception e10) {
e10.printStackTrace();
return null;
}
}
private static X509TrustManager i() {
return new C0164a();
}
private void j(String str, Map<String, Integer> map) {
if (TextUtils.isEmpty(str)) {
return;
}
try {
JSONArray jSONArray = new JSONObject(str).getJSONArray("data");
for (int i10 = 0; i10 < jSONArray.length(); i10++) {
JSONObject jSONObject = (JSONObject) jSONArray.get(i10);
map.put(jSONObject.getString(ParserTag.TAG_PACKAGE_NAME), Integer.valueOf(jSONObject.getInt("categoryId")));
}
} catch (JSONException e10) {
q1.a.f("DigitalNetWorks", e10);
}
}
public static boolean k(Context context) {
return f().m(context);
}
private static boolean l(Context context) {
return k.m(context, "main_ask_network_user_agree");
}
private boolean m(Context context) {
NetworkInfo activeNetworkInfo;
if (context == null || (activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo()) == null) {
return false;
}
return activeNetworkInfo.isAvailable();
}
private static v n() {
X509TrustManager i10 = i();
v.a G = new v.a().G(Collections.singletonList(w.HTTP_1_1));
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
return G.H(3000L, timeUnit).J(3000L, timeUnit).I(h(i10), i10).F(d.f11848a).a();
}
public z a(x xVar) throws IOException {
return n().t(xVar).u();
}
public Map<String, Integer> b(String[] strArr) {
ArrayMap arrayMap = new ArrayMap();
if (k(DigitalWellBeingApp.i()) && l(DigitalWellBeingApp.i())) {
HashMap hashMap = new HashMap();
int a10 = c8.d.a();
hashMap.put("appPackages", strArr);
String g10 = b.g(hashMap, a10, e());
if (!TextUtils.isEmpty(g10)) {
r d10 = new r.a().a("appId", "1001").a("ts", String.valueOf(a10)).a("sign", g10).d();
x.a aVar = new x.a();
try {
z a11 = a(aVar.h(g() + "/observer/appInfo/getCategorys").c(d10).e(y.c(u.e("application/json;charset=utf-8"), e().r(hashMap))).a());
if (a11.E()) {
j(a11.h().C(), arrayMap);
}
} catch (Throwable th) {
q1.a.d("DigitalNetWorks", "failed! " + th.getMessage());
}
}
return arrayMap;
}
return arrayMap;
}
}