正在查看: 饼干视频 v4.1.0 应用的 C0057.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 饼干视频 v4.1.0 应用的 C0057.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package amc.cd.p014;
import amc.cd.p021.C0090;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import com.hailiang.advlib.common.d;
import com.hailiang.advlib.common.e;
import com.hailiang.advlib.core.QMConfig;
import com.jd.ad.sdk.dl.common.CommonConstants;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import org.json.JSONObject;
public class C0057 {
public static AtomicInteger f54;
public static String f55;
public static List<InterfaceC0056> f56;
public static volatile boolean f57;
public static String f58;
public static final String f59;
public static InterfaceC0051 f60;
public static volatile C0062 f61;
public static long f62;
public static String f63;
public static final char[] f64;
public static String f65;
public static int f66;
public static final String f67;
public static boolean f68;
public static String f69;
public static long f70;
public static Context f71;
public static boolean f72;
public static String f73;
public static int f74;
public static String f75;
public static String f76;
public static class RunnableC0058 implements Runnable {
public final long f77;
public final boolean f78;
public final boolean f79;
public RunnableC0058(boolean z, boolean z2, long j) {
this.f78 = z;
this.f79 = z2;
this.f77 = j;
}
@Override
public void run() {
Map<String, String> m39 = C0057.m39();
if (C0057.m22()) {
d.a(C0057.f71, C0057.f55.equals(C0057.f67), this.f78, this.f79, this.f77, C0057.f70, m39);
} else {
d.a(C0057.f71, C0057.f55.equals(C0057.f67), this.f78, this.f79, "unknow", C0057.f70, m39);
}
}
}
public static class RunnableC0059 implements Runnable {
public final JSONObject f80;
public RunnableC0059(JSONObject jSONObject) {
this.f80 = jSONObject;
}
@Override
public void run() {
C0057.m24(this.f80);
}
}
public static class RunnableC0060 implements Runnable {
public final QMConfig f81;
public RunnableC0060(QMConfig qMConfig) {
this.f81 = qMConfig;
}
@Override
public void run() {
if (C0057.m33(C0057.f71)) {
C0053.m5().m11(this.f81);
}
}
}
public static class RunnableC0061 implements Runnable {
public final boolean f82;
public final Throwable f83;
public final boolean f84;
public RunnableC0061(Throwable th, boolean z, boolean z2) {
this.f83 = th;
this.f84 = z;
this.f82 = z2;
}
@Override
public void run() {
try {
d.a(C0057.f71, this.f83.getMessage(), C0057.m36(this.f83), C0057.m39(), this.f84, this.f82);
} catch (Throwable unused) {
}
}
}
static {
String str = Build.VERSION.RELEASE;
f59 = str.contains("12") ? "_hailiang_localjar" : "_hailiang_local.jar";
f67 = str.contains("12") ? "_hailiang_remotejar" : "_hailiang_remote.jar";
f75 = "https://update0.qquanquan.com/qm/nsdk/cgi/";
f55 = null;
f69 = null;
f63 = null;
f61 = null;
f64 = new char[0];
f54 = new AtomicInteger(0);
f57 = false;
f70 = 0L;
f62 = 0L;
f56 = new CopyOnWriteArrayList();
f66 = 0;
}
public static void m16(com.hailiang.advlib.core.QMConfig r11) {
throw new UnsupportedOperationException("Method not decompiled: amc.cd.p014.C0057.m16(com.hailiang.advlib.core.QMConfig):void");
}
public static boolean m18(QMConfig qMConfig, @NonNull InterfaceC0051 interfaceC0051) {
f58 = qMConfig.getVersionName();
f60 = interfaceC0051;
if (f54.getAndIncrement() > 0) {
return false;
}
Context context = qMConfig.getContext();
f71 = context;
d.a(context);
f62 = System.currentTimeMillis();
m16(qMConfig);
return false;
}
public static void m19(QMConfig qMConfig) {
d.a(new RunnableC0060(qMConfig), 100L);
}
public static boolean m20() {
return false;
}
public static boolean m22() {
return f61 != null && f61.m43();
}
public static Bundle m23() {
Bundle bundle = new Bundle();
bundle.putString("expectedSdkVersion", f73);
bundle.putString("sdkVersion", f60.b());
return bundle;
}
public static void m24(JSONObject jSONObject) {
if (!m20() && f66 <= 2) {
try {
if (f63 == null || f69 == null) {
m37(f71);
}
new C0062(f63 + "/" + f67, f69, null, C0057.class.getClassLoader());
f66 = 0;
if (jSONObject.has("version")) {
m40(f71, jSONObject.getString("version"));
}
} catch (Throwable unused) {
f66++;
d.a(new RunnableC0059(jSONObject), 5000L);
}
}
}
public static void m26() {
try {
File file = new File(f63 + "/" + f59);
try {
if (file.exists()) {
file.delete();
}
} catch (Throwable unused) {
}
InputStream open = f71.getAssets().open(f60.c());
FileOutputStream fileOutputStream = new FileOutputStream(file);
e.b(open, fileOutputStream);
fileOutputStream.close();
open.close();
file.setReadOnly();
f55 = f59;
f73 = "3.468";
f68 = false;
m31(f71);
} catch (IOException e) {
e.printStackTrace();
} catch (Throwable unused2) {
}
f55 = f59;
f73 = "3.468";
}
public static void m27(Throwable th, boolean z, boolean z2) {
d.a(new RunnableC0061(th, z, z2), 100L);
}
public static void m28(boolean z, boolean z2) {
d.a(new RunnableC0058(z, z2, System.currentTimeMillis() - f62), 100L);
if (m22()) {
return;
}
f54.decrementAndGet();
}
public static void m29() {
Context context = f71;
if (context == null) {
return;
}
SharedPreferences sharedPreferences = context.getSharedPreferences("hailiang_loadremote_config", 0);
if (TextUtils.equals(sharedPreferences.getString("lastLoadDexVersion", ""), f73)) {
f72 = false;
} else {
f72 = true;
sharedPreferences.edit().putString("lastLoadDexVersion", f73).commit();
}
}
public static void m30() {
for (InterfaceC0056 interfaceC0056 : f56) {
interfaceC0056.m14(m22(), m23());
f56.remove(interfaceC0056);
}
}
public static void m31(Context context) {
try {
context.getSharedPreferences("hailiang_loadremote_config", 0).edit().putString("aisdk_lib_local", "3.468").apply();
} catch (Throwable unused) {
}
}
public static boolean m33(Context context) {
if (context != null && context.getApplicationContext() != null) {
try {
return context.getApplicationContext().getPackageName().equals(e.c(context));
} catch (Throwable unused) {
}
}
return true;
}
public static void m34(String str) throws ClassNotFoundException {
f61 = null;
C0090.m53().m56("loadD");
f61 = new C0062(f63 + "/" + str, f69, null, C0057.class.getClassLoader());
C0090.m53().m60("loadD");
f61.m42(f60.e());
m29();
}
public static boolean m35(String str, String str2) {
try {
return str.compareTo(str2) >= 0;
} catch (Throwable unused) {
return false;
}
}
public static String m36(Throwable th) {
try {
StringWriter stringWriter = new StringWriter();
th.printStackTrace(new PrintWriter(stringWriter));
return URLEncoder.encode(stringWriter.toString(), CommonConstants.CHARSET_UTF8);
} catch (Throwable unused) {
return "";
}
}
public static boolean m37(Context context) {
try {
if (f63 != null) {
return true;
}
f63 = context.getDir("qm", 0).getAbsolutePath();
f69 = context.getCodeCacheDir().getAbsolutePath();
return true;
} catch (NullPointerException e) {
e.printStackTrace();
return false;
}
}
public static int[] m38(Context context) {
try {
SharedPreferences sharedPreferences = context.getSharedPreferences("hailiang_loadremote_config", 0);
f76 = sharedPreferences.getString("aisdk_lib_local", "1.0");
f65 = sharedPreferences.getString("aisdk_lib_version", "1.0");
return new int[]{m35(f76, "3.468") ? 1 : 0, m35(f65, "3.468") ? 1 : 0};
} catch (Throwable th) {
d.a(context, th.getMessage());
return new int[]{0, 0};
}
}
public static Map<String, String> m39() {
HashMap hashMap = new HashMap();
try {
hashMap.put("opt_isRemote", (f68 ? 1 : 0) + "");
hashMap.put("opt_local_version", f76);
hashMap.put("opt_remote_version", f65);
hashMap.put("opt_is_update", "1");
hashMap.put("opt_channel", "hailiang");
hashMap.put("opt_is_androidx", String.valueOf(e.a()));
hashMap.put("opt_new_inside_version", "15.434");
hashMap.put("opt_load_version", f73);
hashMap.put("opt_time", System.currentTimeMillis() + "");
hashMap.put("opt_location", String.valueOf(f74));
hashMap.put("opt_lib_pkgname", C0063.m44());
hashMap.put("opt_is_first_load", String.valueOf(f72));
if (f71 != null) {
String m48 = C0064.m45().m48(f71);
String m49 = C0064.m45().m49(f71);
hashMap.put("opt_app_t", m48);
hashMap.put("opt_app_o", m49);
}
} catch (Throwable th) {
th.printStackTrace();
}
return hashMap;
}
public static void m40(Context context, String str) {
try {
if (TextUtils.isEmpty(str)) {
return;
}
context.getSharedPreferences("hailiang_loadremote_config", 0).edit().putString("aisdk_lib_version", str).commit();
} catch (Throwable unused) {
}
}
public static String m41(Context context) {
try {
SharedPreferences sharedPreferences = context.getSharedPreferences("hailiang_loadremote_config", 0);
String string = sharedPreferences.getString("ruid", "");
if (!TextUtils.isEmpty(string)) {
return string;
}
String uuid = UUID.randomUUID().toString();
sharedPreferences.edit().putString("ruid", uuid).apply();
return uuid;
} catch (Throwable unused) {
return "";
}
}
}