安全中心 v4.9.2版本的 MD5 值为:d64c0ec7920c532fa6e6d9bb001cf9bf
以下内容为反编译后的 aru.java 源代码,内容仅作参考
package tcs;
import android.annotation.SuppressLint;
import android.content.Context;
import android.text.TextUtils;
import com.tencent.bugly.crashreport.common.info.PlugInBean;
import com.tencent.bugly.crashreport.common.strategy.StrategyBean;
import com.tencent.bugly.crashreport.crash.jni.NativeCrashHandler;
import com.tencent.feedback.eup.jni.NativeExceptionUpload;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ScheduledExecutorService;
public class aru extends aif {
public static final int eKi = 1003;
private static boolean a = false;
private static arv eKj = null;
private static com.tencent.bugly.crashreport.crash.e eKk = null;
private static art eKl = null;
private static com.tencent.bugly.proguard.ag eKm = null;
private static aru eKn = new aru();
@Override
public void a(Context context, boolean z, ahr ahrVar) {
}
public static aru wz() {
return eKn;
}
@Override
public void a(StrategyBean strategyBean) {
com.tencent.bugly.crashreport.crash.c pc;
if (strategyBean != null && (pc = com.tencent.bugly.crashreport.crash.c.pc()) != null) {
pc.b(strategyBean);
}
}
@Override
public String[] ij() {
return new String[]{"t_cr"};
}
public static void bM(Context context) {
a(context, (art) null, (ass) null, true, (arv) null);
}
public static void g(Context context, boolean z) {
a(context, null, null, z, null, 0L);
}
public static void a(Context context, art artVar, ass assVar, boolean z, arv arvVar) {
a(context, artVar, assVar, z, arvVar, 0L);
}
public static void a(Context context, art artVar, final ass assVar, boolean z, arv arvVar, long j) {
if (context != null) {
com.tencent.bugly.proguard.ak.OT = "eup";
com.tencent.bugly.proguard.ak.a = "eup";
StrategyBean.Rb = "http://monitor.uu.qq.com/analytics/rqdsync";
StrategyBean.a = "http://android.rqd.qq.com/analytics/async";
StrategyBean.OT = "http://android.rqd.qq.com/analytics/async";
eKj = arvVar;
a = true;
a(artVar);
if (assVar != null) {
eKm = new com.tencent.bugly.proguard.ag() {
@Override
public final void a(int i) {
ass.this.av(i);
}
@Override
public final void a(int i, com.tencent.bugly.proguard.l lVar, long j2, long j3, boolean z2, String str) {
ass.this.a(i, lVar == null ? -1 : lVar.b, j2, j3, z2, str);
}
};
com.tencent.bugly.proguard.ah vd = com.tencent.bugly.proguard.ah.vd();
if (vd != null) {
vd.eJE = eKm;
}
}
ahr ahrVar = new ahr();
if (arvVar != null) {
com.tencent.bugly.crashreport.crash.c.WA = arvVar.Gm() * 24 * 3600 * 1000;
com.tencent.bugly.crashreport.crash.c.cms = arvVar.IJ();
com.tencent.bugly.crashreport.crash.c.eBF = arvVar.IK();
com.tencent.bugly.crashreport.crash.c.eCd = arvVar.Jj();
com.tencent.bugly.crashreport.crash.c.adq = arvVar.IL();
com.tencent.bugly.crashreport.crash.c.d = arvVar.Ek();
com.tencent.bugly.crashreport.crash.c.e = arvVar.Ej();
com.tencent.bugly.crashreport.crash.c.agm = arvVar.Gz();
com.tencent.bugly.crashreport.crash.c.eBH = arvVar.CI();
}
ahrVar.h(j);
String str = com.tencent.bugly.crashreport.common.info.b.I(context).Ri;
if (str == null || str.trim().length() <= 0) {
com.tencent.bugly.crashreport.common.info.b.I(context).a(context.getPackageName());
}
String str2 = com.tencent.bugly.crashreport.common.info.b.I(context).l;
if (str2 != null) {
if (!(str2 == null || str2.trim().length() <= 0)) {
int i = 0;
for (char c : str2.toCharArray()) {
if (c == '.') {
i++;
}
}
if (i < 3) {
String str3 = str2 + "." + com.tencent.bugly.crashreport.common.info.b.I(context).eCM;
com.tencent.bugly.crashreport.common.info.b.I(context).l = str3;
com.tencent.bugly.proguard.ak.b("rqdp{ RQD version: %s }", str3);
}
}
}
com.tencent.bugly.crashreport.common.info.b.I(context).akA = z;
com.tencent.bugly.crashreport.crash.c.Zp = true;
com.tencent.bugly.crashreport.common.strategy.a.b = 21600000L;
ahrVar.ac(false);
aih.a(context, context.getPackageName(), false, ahrVar);
com.tencent.bugly.crashreport.crash.c.a(1003, context, aih.Zp, null, eKk, null);
com.tencent.bugly.crashreport.crash.c.pc().wC();
if (arvVar == null || arvVar.pa()) {
com.tencent.bugly.crashreport.crash.c.pc().mo();
} else {
com.tencent.bugly.proguard.ak.b("[crash] Closed ANR monitor!", new Object[0]);
com.tencent.bugly.crashreport.crash.c.pc().pe();
}
com.tencent.bugly.proguard.ah.vd().eJE = eKm;
com.tencent.bugly.crashreport.crash.c.pc().a(j);
}
}
public static void d(Context context, String str, boolean z) {
a(context, str, z, (List<File>) null, (File) null);
}
public static void a(Context context, String str, boolean z, List<File> list) {
a(context, str, z, list, (File) null);
}
@SuppressLint({"SdCardPath"})
public static void a(Context context, String str, boolean z, List<File> list, File file) {
if (a) {
com.tencent.bugly.crashreport.common.info.b I = com.tencent.bugly.crashreport.common.info.b.I(context);
if (file != null) {
String absolutePath = file.getAbsolutePath();
if (!(absolutePath == null || absolutePath.trim().length() <= 0)) {
I.eBO = absolutePath;
}
}
if (file != null) {
if (list == null) {
list = new ArrayList<>();
}
list.add(file);
}
if (I.nU() == null) {
com.tencent.bugly.proguard.ak.d("no setted SO , query so!", new Object[0]);
com.tencent.bugly.proguard.aj.wy().h(new arw(context, akc.cMG + context.getPackageName() + "/lib/", list));
}
NativeCrashHandler pm = NativeCrashHandler.pm();
if (pm != null) {
if (!(str == null || str.trim().length() <= 0)) {
pm.eA(str);
}
com.tencent.feedback.eup.jni.a ar = com.tencent.feedback.eup.jni.a.ar(context);
ar.gi(str);
NativeExceptionUpload.setmHandler(ar);
com.tencent.bugly.crashreport.crash.c.pc().pd();
}
com.tencent.bugly.crashreport.crash.c.pc().a(0L);
}
}
public static art Cw() {
return eKl;
}
public static void a(final art artVar) {
if (artVar != null) {
eKl = artVar;
eKk = new com.tencent.bugly.crashreport.crash.e() {
@Override
public final boolean a(boolean z, String str, String str2, String str3, int i, long j, String str4, String str5, String str6, String str7) {
return art.this.b(z, str, str2, str3, i, j, str4, str5, str6, str7);
}
@Override
public final void a(boolean z) {
art.this.ad(z);
}
@Override
public final boolean ah(boolean z) {
return art.this.ae(z);
}
@Override
public final String d(boolean z, String str, String str2, String str3, int i, long j) {
return art.this.b(z, str, str2, str3, -1234567890, j);
}
@Override
public final byte[] c(boolean z, String str, String str2, String str3, int i, long j) {
return art.this.a(z, str, str2, str3, -1234567890, j);
}
};
com.tencent.bugly.crashreport.crash.c pc = com.tencent.bugly.crashreport.crash.c.pc();
if (pc != null) {
pc.a(eKk);
}
}
}
public static arv Gg() {
return eKj;
}
public static void W(Context context, String str) {
if (str != null) {
if (str.length() > 100) {
String substring = str.substring(0, 100);
com.tencent.bugly.proguard.ak.e("userId %s length is over limit %d substring to %s", str, 100, substring);
str = substring;
}
if (!str.equals(com.tencent.bugly.crashreport.common.info.b.I(context).dZ())) {
com.tencent.bugly.crashreport.common.info.b.I(context).bi(str);
com.tencent.bugly.proguard.ak.c("[user] set userId : %s", str);
}
}
}
public static boolean b(Context context, String str, String str2, String str3) {
return com.tencent.bugly.crashreport.common.info.b.I(context).a(str, str2, str3);
}
public static void X(Context context, String str) {
com.tencent.bugly.crashreport.common.info.b.I(context).cv(str);
}
public static int bN(Context context) {
com.tencent.bugly.crashreport.crash.c pc = com.tencent.bugly.crashreport.crash.c.pc();
if (pc != null) {
return pc.ph();
}
return 0;
}
public static byte[] an(Context context) {
if (com.tencent.bugly.crashreport.crash.c.pc() != null) {
return com.tencent.bugly.crashreport.crash.c.pc().pg();
}
return null;
}
public static boolean Gh() {
com.tencent.bugly.crashreport.crash.c pc = com.tencent.bugly.crashreport.crash.c.pc();
if (pc == null) {
return false;
}
pc.a(0L);
return true;
}
public static boolean aq(Context context) {
return bN(context) > 0;
}
@Deprecated
public static int bO(Context context) {
return bN(context);
}
public static boolean a(Thread thread, Throwable th, String str, byte[] bArr) {
com.tencent.bugly.crashreport.crash.c pc = com.tencent.bugly.crashreport.crash.c.pc();
if (pc == null) {
return false;
}
pc.a(thread, th, false, str, bArr);
return true;
}
public static void co(boolean z) {
com.tencent.bugly.crashreport.crash.c pc = com.tencent.bugly.crashreport.crash.c.pc();
if (pc != null) {
if (z) {
pc.wC();
} else {
pc.b();
}
}
}
public static void cX(boolean z) {
com.tencent.bugly.crashreport.crash.c pc = com.tencent.bugly.crashreport.crash.c.pc();
if (pc != null) {
if (z) {
pc.pd();
}
pc.mm();
}
}
public static long h(Context context, boolean z) {
com.tencent.bugly.proguard.ah vd = com.tencent.bugly.proguard.ah.vd();
if (vd != null) {
return vd.aX(false);
}
return -1L;
}
public static void bP(Context context) {
com.tencent.bugly.proguard.ah vd = com.tencent.bugly.proguard.ah.vd();
if (vd != null) {
vd.b();
vd.wC();
}
}
public static void j(boolean z, boolean z2) {
if (z) {
com.tencent.bugly.proguard.ak.OT = "eup";
com.tencent.bugly.proguard.ak.a = "eup";
com.tencent.bugly.proguard.ak.agm = true;
aih.Zp = true;
com.tencent.bugly.proguard.ak.e("'setLogAble(boolean)' is true , so running in debug model , close it when you release!", new Object[0]);
return;
}
com.tencent.bugly.proguard.ak.agm = false;
}
public static void b(ScheduledExecutorService scheduledExecutorService) {
if (scheduledExecutorService != null) {
com.tencent.bugly.proguard.aj.wy().a(scheduledExecutorService);
}
}
public static void d(Context context, String str) {
if (str != null) {
com.tencent.bugly.crashreport.common.info.b.I(context).cn(str);
}
}
public static void Q(Context context, String str) {
com.tencent.bugly.crashreport.common.info.b.I(context).cw(str);
}
public static void Y(Context context, String str) {
com.tencent.bugly.crashreport.common.info.b.I(context).eBM = str;
com.tencent.bugly.proguard.ak.d("set sha1 %s", str);
}
public static void b(Context context, List<yo> list) {
if (list != null && list.size() != 0) {
com.tencent.bugly.crashreport.common.info.b I = com.tencent.bugly.crashreport.common.info.b.I(context);
HashMap hashMap = new HashMap(list.size());
for (yo yoVar : list) {
hashMap.put("sosha1_" + yoVar.cur, new PlugInBean(yoVar.bgu, yoVar.cup, yoVar.cur));
}
I.g(hashMap);
}
}
public static void m(Context context, String str) {
if (!TextUtils.isEmpty(str)) {
if (str.length() > 100) {
String substring = str.substring(0, 100);
com.tencent.bugly.proguard.ak.e("appVersion %s length is over limit %d substring to %s", str, 100, substring);
str = substring;
}
com.tencent.bugly.crashreport.common.info.b.I(context).l = str;
}
}
public static void i(Context context, boolean z) {
com.tencent.bugly.crashreport.common.info.b.I(context).b(Boolean.valueOf(z));
}
public static void O(Context context, String str) {
com.tencent.bugly.crashreport.common.info.b.I(context).Ri = str;
}
public static void eY(String str) {
com.tencent.bugly.crashreport.common.info.b kg = com.tencent.bugly.crashreport.common.info.b.kg();
if (kg == null) {
com.tencent.bugly.proguard.ak.e("Can not set RDM UUID if RQD has not been initialized.", new Object[0]);
} else {
kg.eCN = str;
}
}
public static void Z(Context context, String str) {
com.tencent.bugly.crashreport.common.info.b.I(context).a(str);
}
public static void m(Context context, int i) {
if (context == null) {
com.tencent.bugly.proguard.ak.e("setTag args context should not be null", new Object[0]);
} else if (i <= 0) {
com.tencent.bugly.proguard.ak.e("setTag args tagId should > 0", new Object[0]);
} else {
com.tencent.bugly.crashreport.common.info.b.I(context).a(i);
com.tencent.bugly.proguard.ak.c("[param] set user scene tag: %d", Integer.valueOf(i));
}
}
public static int M(Context context) {
if (context != null) {
return com.tencent.bugly.crashreport.common.info.b.I(context).nx();
}
com.tencent.bugly.proguard.ak.e("getUserSceneTagId args context should not be null", new Object[0]);
return -1;
}
public static String ao(Context context, String str) {
if (context == null) {
com.tencent.bugly.proguard.ak.e("getUserDataValue args context should not be null", new Object[0]);
return null;
}
if (str == null || str.trim().length() <= 0) {
return null;
}
return com.tencent.bugly.crashreport.common.info.b.I(context).eq(str);
}
public static void l(Context context, String str, String str2) {
if (context == null) {
com.tencent.bugly.proguard.ak.e("putUserData args context should not be null", new Object[0]);
return;
}
if (str == null || str.trim().length() <= 0) {
com.tencent.bugly.proguard.ak.e("putUserData args key should not be null", new Object[0]);
return;
}
if (str2 == null || str2.trim().length() <= 0) {
com.tencent.bugly.proguard.ak.e("putUserData args value should not be null", new Object[0]);
return;
}
if (!str.matches("[a-zA-Z[0-9]_]+")) {
com.tencent.bugly.proguard.ak.e("putUserData args key should match [a-zA-Z[0-9]_]+ {" + str + "}", new Object[0]);
return;
}
if (str2.length() > 200) {
com.tencent.bugly.proguard.ak.e("user data value length over limit %d , has been cutted!", 200);
str2 = str2.substring(0, 200);
}
com.tencent.bugly.crashreport.common.info.b I = com.tencent.bugly.crashreport.common.info.b.I(context);
if (I.nq().contains(str)) {
com.tencent.bugly.crashreport.common.info.b.I(context).a(str, str2);
com.tencent.bugly.proguard.ak.d("replace KV %s %s", str, str2);
} else if (I.np() >= 100) {
com.tencent.bugly.proguard.ak.e("user data size is over limit %d , will drop this new key %s", 10, str);
} else if (str.length() > 50) {
com.tencent.bugly.proguard.ak.e("user data key length over limit %d , will drop this new key %s", 50, str);
} else {
com.tencent.bugly.crashreport.common.info.b.I(context).a(str, str2);
com.tencent.bugly.proguard.ak.c("[param] set user data: %s - %s", str, str2);
}
}
public static String ap(Context context, String str) {
if (context == null) {
com.tencent.bugly.proguard.ak.e("removeUserData args context should not be null", new Object[0]);
return null;
}
if (str == null || str.trim().length() <= 0) {
return null;
}
com.tencent.bugly.proguard.ak.c("[param] remove user data: %s", str);
return com.tencent.bugly.crashreport.common.info.b.I(context).db(str);
}
public static Set<String> cv(Context context) {
if (context != null) {
return com.tencent.bugly.crashreport.common.info.b.I(context).nq();
}
com.tencent.bugly.proguard.ak.e("getAllUserDataKeys args context should not be null", new Object[0]);
return null;
}
public static int cw(Context context) {
if (context != null) {
return com.tencent.bugly.crashreport.common.info.b.I(context).np();
}
com.tencent.bugly.proguard.ak.e("getUserDatasSize args context should not be null", new Object[0]);
return -1;
}
public static void be(boolean z) {
com.tencent.bugly.proguard.ad.a = z;
}
}