Initial commit
This commit is contained in:
532
sources/com/tencent/bugly/proguard/a.java
Normal file
532
sources/com/tencent/bugly/proguard/a.java
Normal file
@@ -0,0 +1,532 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import com.tencent.bugly.crashreport.biz.UserInfoBean;
|
||||
import com.tencent.bugly.crashreport.common.strategy.StrategyBean;
|
||||
import java.lang.reflect.Array;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Proxy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public class a {
|
||||
private static Proxy e;
|
||||
protected HashMap<String, HashMap<String, byte[]>> a = new HashMap<>();
|
||||
protected String b;
|
||||
i c;
|
||||
private HashMap<String, Object> d;
|
||||
|
||||
a() {
|
||||
new HashMap();
|
||||
this.d = new HashMap<>();
|
||||
this.b = "GBK";
|
||||
this.c = new i();
|
||||
}
|
||||
|
||||
public static aj a(int i) {
|
||||
if (i == 1) {
|
||||
return new ai();
|
||||
}
|
||||
if (i == 3) {
|
||||
return new ah();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Proxy b() {
|
||||
return e;
|
||||
}
|
||||
|
||||
public static void a(String str, int i) {
|
||||
if (TextUtils.isEmpty(str)) {
|
||||
e = null;
|
||||
} else {
|
||||
e = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(str, i));
|
||||
}
|
||||
}
|
||||
|
||||
public static void a(InetAddress inetAddress, int i) {
|
||||
if (inetAddress == null) {
|
||||
e = null;
|
||||
} else {
|
||||
e = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(inetAddress, i));
|
||||
}
|
||||
}
|
||||
|
||||
public void a(String str) {
|
||||
this.b = str;
|
||||
}
|
||||
|
||||
public static at a(UserInfoBean userInfoBean) {
|
||||
if (userInfoBean == null) {
|
||||
return null;
|
||||
}
|
||||
at atVar = new at();
|
||||
atVar.a = userInfoBean.e;
|
||||
atVar.e = userInfoBean.j;
|
||||
atVar.d = userInfoBean.c;
|
||||
atVar.c = userInfoBean.d;
|
||||
atVar.g = com.tencent.bugly.crashreport.common.info.a.b().i();
|
||||
atVar.h = userInfoBean.o == 1;
|
||||
int i = userInfoBean.b;
|
||||
if (i == 1) {
|
||||
atVar.b = (byte) 1;
|
||||
} else if (i == 2) {
|
||||
atVar.b = (byte) 4;
|
||||
} else if (i == 3) {
|
||||
atVar.b = (byte) 2;
|
||||
} else if (i != 4) {
|
||||
if (i < 10 || i >= 20) {
|
||||
x.e("unknown uinfo type %d ", Integer.valueOf(userInfoBean.b));
|
||||
return null;
|
||||
}
|
||||
atVar.b = (byte) i;
|
||||
} else {
|
||||
atVar.b = (byte) 3;
|
||||
}
|
||||
atVar.f = new HashMap();
|
||||
if (userInfoBean.p >= 0) {
|
||||
Map<String, String> map = atVar.f;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(userInfoBean.p);
|
||||
map.put("C01", sb.toString());
|
||||
}
|
||||
if (userInfoBean.q >= 0) {
|
||||
Map<String, String> map2 = atVar.f;
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
sb2.append(userInfoBean.q);
|
||||
map2.put("C02", sb2.toString());
|
||||
}
|
||||
Map<String, String> map3 = userInfoBean.r;
|
||||
if (map3 != null && map3.size() > 0) {
|
||||
for (Map.Entry<String, String> entry : userInfoBean.r.entrySet()) {
|
||||
atVar.f.put("C03_" + entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
Map<String, String> map4 = userInfoBean.s;
|
||||
if (map4 != null && map4.size() > 0) {
|
||||
for (Map.Entry<String, String> entry2 : userInfoBean.s.entrySet()) {
|
||||
atVar.f.put("C04_" + entry2.getKey(), entry2.getValue());
|
||||
}
|
||||
}
|
||||
Map<String, String> map5 = atVar.f;
|
||||
StringBuilder sb3 = new StringBuilder();
|
||||
sb3.append(!userInfoBean.l);
|
||||
map5.put("A36", sb3.toString());
|
||||
Map<String, String> map6 = atVar.f;
|
||||
StringBuilder sb4 = new StringBuilder();
|
||||
sb4.append(userInfoBean.g);
|
||||
map6.put("F02", sb4.toString());
|
||||
Map<String, String> map7 = atVar.f;
|
||||
StringBuilder sb5 = new StringBuilder();
|
||||
sb5.append(userInfoBean.h);
|
||||
map7.put("F03", sb5.toString());
|
||||
atVar.f.put("F04", userInfoBean.j);
|
||||
Map<String, String> map8 = atVar.f;
|
||||
StringBuilder sb6 = new StringBuilder();
|
||||
sb6.append(userInfoBean.i);
|
||||
map8.put("F05", sb6.toString());
|
||||
atVar.f.put("F06", userInfoBean.m);
|
||||
Map<String, String> map9 = atVar.f;
|
||||
StringBuilder sb7 = new StringBuilder();
|
||||
sb7.append(userInfoBean.k);
|
||||
map9.put("F10", sb7.toString());
|
||||
x.c("summary type %d vm:%d", Byte.valueOf(atVar.b), Integer.valueOf(atVar.f.size()));
|
||||
return atVar;
|
||||
}
|
||||
|
||||
public static String a(ArrayList<String> arrayList) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
int i = 0;
|
||||
while (true) {
|
||||
String str = "map";
|
||||
if (i < arrayList.size()) {
|
||||
String str2 = arrayList.get(i);
|
||||
if (str2.equals("java.lang.Integer") || str2.equals("int")) {
|
||||
str = "int32";
|
||||
} else if (str2.equals("java.lang.Boolean") || str2.equals("boolean")) {
|
||||
str = "bool";
|
||||
} else if (str2.equals("java.lang.Byte") || str2.equals("byte")) {
|
||||
str = "char";
|
||||
} else if (str2.equals("java.lang.Double") || str2.equals("double")) {
|
||||
str = "double";
|
||||
} else if (str2.equals("java.lang.Float") || str2.equals("float")) {
|
||||
str = "float";
|
||||
} else if (str2.equals("java.lang.Long") || str2.equals("long")) {
|
||||
str = "int64";
|
||||
} else if (str2.equals("java.lang.Short") || str2.equals("short")) {
|
||||
str = "short";
|
||||
} else {
|
||||
if (str2.equals("java.lang.Character")) {
|
||||
throw new IllegalArgumentException("can not support java.lang.Character");
|
||||
}
|
||||
if (str2.equals("java.lang.String")) {
|
||||
str = "string";
|
||||
} else if (str2.equals("java.util.List")) {
|
||||
str = "list";
|
||||
} else if (!str2.equals("java.util.Map")) {
|
||||
str = str2;
|
||||
}
|
||||
}
|
||||
arrayList.set(i, str);
|
||||
i++;
|
||||
} else {
|
||||
Collections.reverse(arrayList);
|
||||
for (int i2 = 0; i2 < arrayList.size(); i2++) {
|
||||
String str3 = arrayList.get(i2);
|
||||
if (str3.equals("list")) {
|
||||
int i3 = i2 - 1;
|
||||
arrayList.set(i3, "<" + arrayList.get(i3));
|
||||
arrayList.set(0, arrayList.get(0) + ">");
|
||||
} else if (str3.equals("map")) {
|
||||
int i4 = i2 - 1;
|
||||
arrayList.set(i4, "<" + arrayList.get(i4) + ",");
|
||||
arrayList.set(0, arrayList.get(0) + ">");
|
||||
} else if (str3.equals("Array")) {
|
||||
int i5 = i2 - 1;
|
||||
arrayList.set(i5, "<" + arrayList.get(i5));
|
||||
arrayList.set(0, arrayList.get(0) + ">");
|
||||
}
|
||||
}
|
||||
Collections.reverse(arrayList);
|
||||
Iterator<String> it = arrayList.iterator();
|
||||
while (it.hasNext()) {
|
||||
stringBuffer.append(it.next());
|
||||
}
|
||||
return stringBuffer.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public <T> void a(String str, T t) {
|
||||
if (str == null) {
|
||||
throw new IllegalArgumentException("put key can not is null");
|
||||
}
|
||||
if (t != null) {
|
||||
if (!(t instanceof Set)) {
|
||||
j jVar = new j();
|
||||
jVar.a(this.b);
|
||||
jVar.a(t, 0);
|
||||
byte[] a = l.a(jVar.a());
|
||||
HashMap<String, byte[]> hashMap = new HashMap<>(1);
|
||||
ArrayList<String> arrayList = new ArrayList<>(1);
|
||||
a(arrayList, t);
|
||||
hashMap.put(a(arrayList), a);
|
||||
this.d.remove(str);
|
||||
this.a.put(str, hashMap);
|
||||
return;
|
||||
}
|
||||
throw new IllegalArgumentException("can not support Set");
|
||||
}
|
||||
throw new IllegalArgumentException("put value can not is null");
|
||||
}
|
||||
|
||||
public static au a(List<UserInfoBean> list, int i) {
|
||||
com.tencent.bugly.crashreport.common.info.a b;
|
||||
if (list == null || list.size() == 0 || (b = com.tencent.bugly.crashreport.common.info.a.b()) == null) {
|
||||
return null;
|
||||
}
|
||||
b.t();
|
||||
au auVar = new au();
|
||||
auVar.b = b.d;
|
||||
auVar.c = b.h();
|
||||
ArrayList<at> arrayList = new ArrayList<>();
|
||||
Iterator<UserInfoBean> it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
at a = a(it.next());
|
||||
if (a != null) {
|
||||
arrayList.add(a);
|
||||
}
|
||||
}
|
||||
auVar.d = arrayList;
|
||||
auVar.e = new HashMap();
|
||||
auVar.e.put("A7", b.f);
|
||||
auVar.e.put("A6", b.s());
|
||||
auVar.e.put("A5", b.r());
|
||||
Map<String, String> map = auVar.e;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(b.p());
|
||||
map.put("A2", sb.toString());
|
||||
Map<String, String> map2 = auVar.e;
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
sb2.append(b.p());
|
||||
map2.put("A1", sb2.toString());
|
||||
auVar.e.put("A24", b.h);
|
||||
Map<String, String> map3 = auVar.e;
|
||||
StringBuilder sb3 = new StringBuilder();
|
||||
sb3.append(b.q());
|
||||
map3.put("A17", sb3.toString());
|
||||
auVar.e.put("A15", b.w());
|
||||
Map<String, String> map4 = auVar.e;
|
||||
StringBuilder sb4 = new StringBuilder();
|
||||
sb4.append(b.x());
|
||||
map4.put("A13", sb4.toString());
|
||||
auVar.e.put("F08", b.v);
|
||||
auVar.e.put("F09", b.w);
|
||||
Map<String, String> G = b.G();
|
||||
if (G != null && G.size() > 0) {
|
||||
for (Map.Entry<String, String> entry : G.entrySet()) {
|
||||
auVar.e.put("C04_" + entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
if (i != 1) {
|
||||
if (i != 2) {
|
||||
x.e("unknown up type %d ", Integer.valueOf(i));
|
||||
return null;
|
||||
}
|
||||
auVar.a = (byte) 2;
|
||||
} else {
|
||||
auVar.a = (byte) 1;
|
||||
}
|
||||
return auVar;
|
||||
}
|
||||
|
||||
public static <T extends k> T a(byte[] bArr, Class<T> cls) {
|
||||
if (bArr != null && bArr.length > 0) {
|
||||
try {
|
||||
T newInstance = cls.newInstance();
|
||||
i iVar = new i(bArr);
|
||||
iVar.a("utf-8");
|
||||
newInstance.a(iVar);
|
||||
return newInstance;
|
||||
} catch (Throwable th) {
|
||||
if (!x.b(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ap a(Context context, int i, byte[] bArr) {
|
||||
com.tencent.bugly.crashreport.common.info.a b = com.tencent.bugly.crashreport.common.info.a.b();
|
||||
StrategyBean c = com.tencent.bugly.crashreport.common.strategy.a.a().c();
|
||||
if (b != null && c != null) {
|
||||
try {
|
||||
ap apVar = new ap();
|
||||
synchronized (b) {
|
||||
apVar.a = 1;
|
||||
apVar.b = b.f();
|
||||
apVar.c = b.c;
|
||||
apVar.d = b.j;
|
||||
apVar.e = b.l;
|
||||
b.getClass();
|
||||
apVar.f = "3.1.0";
|
||||
apVar.g = i;
|
||||
apVar.h = bArr == null ? "".getBytes() : bArr;
|
||||
apVar.i = b.g;
|
||||
apVar.j = b.h;
|
||||
apVar.k = new HashMap();
|
||||
apVar.l = b.e();
|
||||
apVar.m = c.p;
|
||||
apVar.o = b.h();
|
||||
apVar.p = com.tencent.bugly.crashreport.common.info.b.c(context);
|
||||
apVar.q = System.currentTimeMillis();
|
||||
apVar.r = b.k();
|
||||
apVar.s = b.j();
|
||||
apVar.t = b.m();
|
||||
apVar.u = b.l();
|
||||
apVar.v = b.n();
|
||||
apVar.w = apVar.p;
|
||||
b.getClass();
|
||||
apVar.n = "com.tencent.bugly";
|
||||
apVar.k.put("A26", b.y());
|
||||
apVar.k.put("A60", b.z());
|
||||
apVar.k.put("A61", b.A());
|
||||
Map<String, String> map = apVar.k;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(b.R());
|
||||
map.put("A62", sb.toString());
|
||||
Map<String, String> map2 = apVar.k;
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
sb2.append(b.S());
|
||||
map2.put("A63", sb2.toString());
|
||||
Map<String, String> map3 = apVar.k;
|
||||
StringBuilder sb3 = new StringBuilder();
|
||||
sb3.append(b.z);
|
||||
map3.put("F11", sb3.toString());
|
||||
Map<String, String> map4 = apVar.k;
|
||||
StringBuilder sb4 = new StringBuilder();
|
||||
sb4.append(b.y);
|
||||
map4.put("F12", sb4.toString());
|
||||
apVar.k.put("G1", b.u());
|
||||
apVar.k.put("A64", b.T());
|
||||
if (b.B) {
|
||||
apVar.k.put("G2", b.L());
|
||||
apVar.k.put("G3", b.M());
|
||||
apVar.k.put("G4", b.N());
|
||||
apVar.k.put("G5", b.O());
|
||||
apVar.k.put("G6", b.P());
|
||||
apVar.k.put("G7", Long.toString(b.Q()));
|
||||
}
|
||||
apVar.k.put("D3", b.k);
|
||||
if (com.tencent.bugly.b.b != null) {
|
||||
for (com.tencent.bugly.a aVar : com.tencent.bugly.b.b) {
|
||||
if (aVar.versionKey != null && aVar.version != null) {
|
||||
apVar.k.put(aVar.versionKey, aVar.version);
|
||||
}
|
||||
}
|
||||
}
|
||||
apVar.k.put("G15", z.b("G15", ""));
|
||||
apVar.k.put("D4", z.b("D4", "0"));
|
||||
}
|
||||
u a = u.a();
|
||||
if (a != null && !a.a && bArr != null) {
|
||||
apVar.h = z.a(apVar.h, 2, 1, c.u);
|
||||
if (apVar.h == null) {
|
||||
x.e("reqPkg sbuffer error!", new Object[0]);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Map<String, String> F = b.F();
|
||||
if (F != null) {
|
||||
for (Map.Entry<String, String> entry : F.entrySet()) {
|
||||
apVar.k.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
return apVar;
|
||||
} catch (Throwable th) {
|
||||
if (!x.b(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
x.e("Can not create request pkg for parameters is invalid.", new Object[0]);
|
||||
return null;
|
||||
}
|
||||
|
||||
private void a(ArrayList<String> arrayList, Object obj) {
|
||||
if (obj.getClass().isArray()) {
|
||||
if (obj.getClass().getComponentType().toString().equals("byte")) {
|
||||
if (Array.getLength(obj) > 0) {
|
||||
arrayList.add("java.util.List");
|
||||
a(arrayList, Array.get(obj, 0));
|
||||
return;
|
||||
} else {
|
||||
arrayList.add("Array");
|
||||
arrayList.add("?");
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("only byte[] is supported");
|
||||
}
|
||||
if (!(obj instanceof Array)) {
|
||||
if (obj instanceof List) {
|
||||
arrayList.add("java.util.List");
|
||||
List list = (List) obj;
|
||||
if (list.size() > 0) {
|
||||
a(arrayList, list.get(0));
|
||||
return;
|
||||
} else {
|
||||
arrayList.add("?");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (obj instanceof Map) {
|
||||
arrayList.add("java.util.Map");
|
||||
Map map = (Map) obj;
|
||||
if (map.size() > 0) {
|
||||
Object next = map.keySet().iterator().next();
|
||||
Object obj2 = map.get(next);
|
||||
arrayList.add(next.getClass().getName());
|
||||
a(arrayList, obj2);
|
||||
return;
|
||||
}
|
||||
arrayList.add("?");
|
||||
arrayList.add("?");
|
||||
return;
|
||||
}
|
||||
arrayList.add(obj.getClass().getName());
|
||||
return;
|
||||
}
|
||||
throw new IllegalArgumentException("can not support Array, please use List");
|
||||
}
|
||||
|
||||
public byte[] a() {
|
||||
j jVar = new j(0);
|
||||
jVar.a(this.b);
|
||||
jVar.a((Map) this.a, 0);
|
||||
return l.a(jVar.a());
|
||||
}
|
||||
|
||||
public void a(byte[] bArr) {
|
||||
this.c.a(bArr);
|
||||
this.c.a(this.b);
|
||||
HashMap hashMap = new HashMap(1);
|
||||
HashMap hashMap2 = new HashMap(1);
|
||||
hashMap2.put("", new byte[0]);
|
||||
hashMap.put("", hashMap2);
|
||||
this.a = this.c.a((Map) hashMap, 0, false);
|
||||
}
|
||||
|
||||
public static byte[] a(Object obj) {
|
||||
try {
|
||||
d dVar = new d();
|
||||
dVar.c();
|
||||
dVar.a("utf-8");
|
||||
dVar.b(1);
|
||||
dVar.b("RqdServer");
|
||||
dVar.c("sync");
|
||||
dVar.a("detail", (String) obj);
|
||||
return dVar.a();
|
||||
} catch (Throwable th) {
|
||||
if (x.b(th)) {
|
||||
return null;
|
||||
}
|
||||
th.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static aq a(byte[] bArr, boolean z) {
|
||||
if (bArr != null) {
|
||||
try {
|
||||
d dVar = new d();
|
||||
dVar.c();
|
||||
dVar.a("utf-8");
|
||||
dVar.a(bArr);
|
||||
Object b = dVar.b("detail", new aq());
|
||||
aq aqVar = aq.class.isInstance(b) ? (aq) aq.class.cast(b) : null;
|
||||
if (!z && aqVar != null && aqVar.c != null && aqVar.c.length > 0) {
|
||||
x.c("resp buf %d", Integer.valueOf(aqVar.c.length));
|
||||
aqVar.c = z.b(aqVar.c, 2, 1, StrategyBean.d);
|
||||
if (aqVar.c == null) {
|
||||
x.e("resp sbuffer error!", new Object[0]);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return aqVar;
|
||||
} catch (Throwable th) {
|
||||
if (!x.b(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static byte[] a(k kVar) {
|
||||
try {
|
||||
j jVar = new j();
|
||||
jVar.a("utf-8");
|
||||
kVar.a(jVar);
|
||||
return jVar.b();
|
||||
} catch (Throwable th) {
|
||||
if (x.b(th)) {
|
||||
return null;
|
||||
}
|
||||
th.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
63
sources/com/tencent/bugly/proguard/aa.java
Normal file
63
sources/com/tencent/bugly/proguard/aa.java
Normal file
@@ -0,0 +1,63 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.SystemClock;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class aa implements Runnable {
|
||||
private final Handler a;
|
||||
private final String b;
|
||||
private long c;
|
||||
private final long d;
|
||||
private boolean e = true;
|
||||
private long f;
|
||||
|
||||
aa(Handler handler, String str, long j) {
|
||||
this.a = handler;
|
||||
this.b = str;
|
||||
this.c = j;
|
||||
this.d = j;
|
||||
}
|
||||
|
||||
public final void a() {
|
||||
if (this.e) {
|
||||
this.e = false;
|
||||
this.f = SystemClock.uptimeMillis();
|
||||
this.a.postAtFrontOfQueue(this);
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean b() {
|
||||
return !this.e && SystemClock.uptimeMillis() > this.f + this.c;
|
||||
}
|
||||
|
||||
public final int c() {
|
||||
if (this.e) {
|
||||
return 0;
|
||||
}
|
||||
return SystemClock.uptimeMillis() - this.f < this.c ? 1 : 3;
|
||||
}
|
||||
|
||||
public final Thread d() {
|
||||
return this.a.getLooper().getThread();
|
||||
}
|
||||
|
||||
public final String e() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public final void f() {
|
||||
this.c = this.d;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.e = true;
|
||||
this.c = this.d;
|
||||
}
|
||||
|
||||
public final void a(long j) {
|
||||
this.c = Long.MAX_VALUE;
|
||||
}
|
||||
}
|
139
sources/com/tencent/bugly/proguard/ab.java
Normal file
139
sources/com/tencent/bugly/proguard/ab.java
Normal file
@@ -0,0 +1,139 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.SystemClock;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class ab extends Thread {
|
||||
private boolean a = false;
|
||||
private List<aa> b = Collections.synchronizedList(new ArrayList());
|
||||
private List<ac> c = Collections.synchronizedList(new ArrayList());
|
||||
|
||||
public final void a() {
|
||||
a(new Handler(Looper.getMainLooper()), 5000L);
|
||||
}
|
||||
|
||||
public final void b() {
|
||||
a(new Handler(Looper.getMainLooper()));
|
||||
}
|
||||
|
||||
public final boolean c() {
|
||||
this.a = true;
|
||||
if (!isAlive()) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
interrupt();
|
||||
} catch (Exception e) {
|
||||
x.e(e.getStackTrace().toString(), new Object[0]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public final boolean d() {
|
||||
if (isAlive()) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
start();
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
x.e(e.getStackTrace().toString(), new Object[0]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // java.lang.Thread, java.lang.Runnable
|
||||
public final void run() {
|
||||
while (!this.a) {
|
||||
for (int i = 0; i < this.b.size(); i++) {
|
||||
this.b.get(i).a();
|
||||
}
|
||||
long uptimeMillis = SystemClock.uptimeMillis();
|
||||
for (long j = 2000; j > 0 && !isInterrupted(); j = 2000 - (SystemClock.uptimeMillis() - uptimeMillis)) {
|
||||
try {
|
||||
Thread.sleep(j);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
int i2 = 0;
|
||||
for (int i3 = 0; i3 < this.b.size(); i3++) {
|
||||
i2 = Math.max(i2, this.b.get(i3).c());
|
||||
}
|
||||
if (i2 != 0 && i2 != 1) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (int i4 = 0; i4 < this.b.size(); i4++) {
|
||||
aa aaVar = this.b.get(i4);
|
||||
if (aaVar.b()) {
|
||||
arrayList.add(aaVar);
|
||||
aaVar.a(Long.MAX_VALUE);
|
||||
}
|
||||
}
|
||||
int i5 = 0;
|
||||
boolean z = false;
|
||||
while (i5 < arrayList.size()) {
|
||||
aa aaVar2 = (aa) arrayList.get(i5);
|
||||
Thread d = aaVar2.d();
|
||||
boolean z2 = z;
|
||||
for (int i6 = 0; i6 < this.c.size(); i6++) {
|
||||
if (this.c.get(i6).a(d)) {
|
||||
z2 = true;
|
||||
}
|
||||
}
|
||||
if (!z2 && aaVar2.e().contains("main")) {
|
||||
aaVar2.f();
|
||||
x.d("although thread is blocked ,may not be anr error,so restore handler check wait time and restart check main thread", new Object[0]);
|
||||
}
|
||||
i5++;
|
||||
z = z2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void a(Handler handler, long j) {
|
||||
if (handler == null) {
|
||||
x.e("addThread handler should not be null", new Object[0]);
|
||||
return;
|
||||
}
|
||||
String name = handler.getLooper().getThread().getName();
|
||||
for (int i = 0; i < this.b.size(); i++) {
|
||||
if (this.b.get(i).e().equals(handler.getLooper().getThread().getName())) {
|
||||
x.e("addThread fail ,this thread has been added in monitor queue", new Object[0]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.b.add(new aa(handler, name, 5000L));
|
||||
}
|
||||
|
||||
public final void b(ac acVar) {
|
||||
this.c.remove(acVar);
|
||||
}
|
||||
|
||||
private void a(Handler handler) {
|
||||
if (handler == null) {
|
||||
x.e("removeThread handler should not be null", new Object[0]);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < this.b.size(); i++) {
|
||||
if (this.b.get(i).e().equals(handler.getLooper().getThread().getName())) {
|
||||
x.c("remove handler::%s", this.b.get(i));
|
||||
this.b.remove(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(ac acVar) {
|
||||
if (this.c.contains(acVar)) {
|
||||
x.e("addThreadMonitorListeners fail ,this threadMonitorListener has been added in monitor queue", new Object[0]);
|
||||
} else {
|
||||
this.c.add(acVar);
|
||||
}
|
||||
}
|
||||
}
|
7
sources/com/tencent/bugly/proguard/ac.java
Normal file
7
sources/com/tencent/bugly/proguard/ac.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public interface ac {
|
||||
boolean a(Thread thread);
|
||||
}
|
15
sources/com/tencent/bugly/proguard/ad.java
Normal file
15
sources/com/tencent/bugly/proguard/ad.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class ad {
|
||||
public static ae a(int i) {
|
||||
if (i == 1) {
|
||||
return new ag();
|
||||
}
|
||||
if (i == 2) {
|
||||
return new af();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
9
sources/com/tencent/bugly/proguard/ae.java
Normal file
9
sources/com/tencent/bugly/proguard/ae.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public interface ae {
|
||||
byte[] a(byte[] bArr) throws Exception;
|
||||
|
||||
byte[] b(byte[] bArr) throws Exception;
|
||||
}
|
43
sources/com/tencent/bugly/proguard/af.java
Normal file
43
sources/com/tencent/bugly/proguard/af.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import com.ijm.dataencryption.de.DataDecryptTool;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class af implements ae {
|
||||
@Override // com.tencent.bugly.proguard.ae
|
||||
public final byte[] a(byte[] bArr) throws Exception {
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(byteArrayOutputStream);
|
||||
gZIPOutputStream.write(bArr);
|
||||
gZIPOutputStream.finish();
|
||||
gZIPOutputStream.close();
|
||||
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
||||
byteArrayOutputStream.close();
|
||||
return byteArray;
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.ae
|
||||
public final byte[] b(byte[] bArr) throws Exception {
|
||||
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bArr);
|
||||
GZIPInputStream gZIPInputStream = new GZIPInputStream(byteArrayInputStream);
|
||||
byte[] bArr2 = new byte[DataDecryptTool.DECRYPT_SP_FILE];
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
while (true) {
|
||||
int read = gZIPInputStream.read(bArr2, 0, bArr2.length);
|
||||
if (read == -1) {
|
||||
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
||||
byteArrayOutputStream.flush();
|
||||
byteArrayOutputStream.close();
|
||||
gZIPInputStream.close();
|
||||
byteArrayInputStream.close();
|
||||
return byteArray;
|
||||
}
|
||||
byteArrayOutputStream.write(bArr2, 0, read);
|
||||
}
|
||||
}
|
||||
}
|
50
sources/com/tencent/bugly/proguard/ag.java
Normal file
50
sources/com/tencent/bugly/proguard/ag.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import com.ijm.dataencryption.de.DataDecryptTool;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class ag implements ae {
|
||||
@Override // com.tencent.bugly.proguard.ae
|
||||
public final byte[] a(byte[] bArr) throws Exception {
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(byteArrayOutputStream);
|
||||
ZipEntry zipEntry = new ZipEntry("zip");
|
||||
zipEntry.setSize(bArr.length);
|
||||
zipOutputStream.putNextEntry(zipEntry);
|
||||
zipOutputStream.write(bArr);
|
||||
zipOutputStream.closeEntry();
|
||||
zipOutputStream.close();
|
||||
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
||||
byteArrayOutputStream.close();
|
||||
return byteArray;
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.ae
|
||||
public final byte[] b(byte[] bArr) throws Exception {
|
||||
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bArr);
|
||||
ZipInputStream zipInputStream = new ZipInputStream(byteArrayInputStream);
|
||||
byte[] bArr2 = null;
|
||||
while (zipInputStream.getNextEntry() != null) {
|
||||
byte[] bArr3 = new byte[DataDecryptTool.DECRYPT_SP_FILE];
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
while (true) {
|
||||
int read = zipInputStream.read(bArr3, 0, bArr3.length);
|
||||
if (read != -1) {
|
||||
byteArrayOutputStream.write(bArr3, 0, read);
|
||||
}
|
||||
}
|
||||
bArr2 = byteArrayOutputStream.toByteArray();
|
||||
byteArrayOutputStream.flush();
|
||||
byteArrayOutputStream.close();
|
||||
}
|
||||
zipInputStream.close();
|
||||
byteArrayInputStream.close();
|
||||
return bArr2;
|
||||
}
|
||||
}
|
62
sources/com/tencent/bugly/proguard/ah.java
Normal file
62
sources/com/tencent/bugly/proguard/ah.java
Normal file
@@ -0,0 +1,62 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class ah implements aj {
|
||||
private String a = null;
|
||||
|
||||
@Override // com.tencent.bugly.proguard.aj
|
||||
public final byte[] a(byte[] bArr) throws Exception {
|
||||
if (this.a == null || bArr == null) {
|
||||
return null;
|
||||
}
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
for (byte b : bArr) {
|
||||
stringBuffer.append(((int) b) + " ");
|
||||
}
|
||||
SecretKeySpec secretKeySpec = new SecretKeySpec(this.a.getBytes(), "AES");
|
||||
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
|
||||
cipher.init(2, secretKeySpec, new IvParameterSpec(this.a.getBytes()));
|
||||
byte[] doFinal = cipher.doFinal(bArr);
|
||||
StringBuffer stringBuffer2 = new StringBuffer();
|
||||
for (byte b2 : doFinal) {
|
||||
stringBuffer2.append(((int) b2) + " ");
|
||||
}
|
||||
return doFinal;
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.aj
|
||||
public final byte[] b(byte[] bArr) throws Exception, NoSuchAlgorithmException {
|
||||
if (this.a == null || bArr == null) {
|
||||
return null;
|
||||
}
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
for (byte b : bArr) {
|
||||
stringBuffer.append(((int) b) + " ");
|
||||
}
|
||||
SecretKeySpec secretKeySpec = new SecretKeySpec(this.a.getBytes(), "AES");
|
||||
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
|
||||
cipher.init(1, secretKeySpec, new IvParameterSpec(this.a.getBytes()));
|
||||
byte[] doFinal = cipher.doFinal(bArr);
|
||||
StringBuffer stringBuffer2 = new StringBuffer();
|
||||
for (byte b2 : doFinal) {
|
||||
stringBuffer2.append(((int) b2) + " ");
|
||||
}
|
||||
return doFinal;
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.aj
|
||||
public final void a(String str) {
|
||||
if (str != null) {
|
||||
for (int length = str.length(); length < 16; length++) {
|
||||
str = str + "0";
|
||||
}
|
||||
this.a = str.substring(0, 16);
|
||||
}
|
||||
}
|
||||
}
|
40
sources/com/tencent/bugly/proguard/ai.java
Normal file
40
sources/com/tencent/bugly/proguard/ai.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.SecretKeyFactory;
|
||||
import javax.crypto.spec.DESKeySpec;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class ai implements aj {
|
||||
private String a = null;
|
||||
|
||||
@Override // com.tencent.bugly.proguard.aj
|
||||
public final byte[] a(byte[] bArr) throws Exception {
|
||||
if (this.a == null || bArr == null) {
|
||||
return null;
|
||||
}
|
||||
Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
|
||||
cipher.init(2, SecretKeyFactory.getInstance("DES").generateSecret(new DESKeySpec(this.a.getBytes("UTF-8"))), new IvParameterSpec(this.a.getBytes("UTF-8")));
|
||||
return cipher.doFinal(bArr);
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.aj
|
||||
public final byte[] b(byte[] bArr) throws Exception, NoSuchAlgorithmException {
|
||||
if (this.a == null || bArr == null) {
|
||||
return null;
|
||||
}
|
||||
Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
|
||||
cipher.init(1, SecretKeyFactory.getInstance("DES").generateSecret(new DESKeySpec(this.a.getBytes("UTF-8"))), new IvParameterSpec(this.a.getBytes("UTF-8")));
|
||||
return cipher.doFinal(bArr);
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.aj
|
||||
public final void a(String str) {
|
||||
if (str != null) {
|
||||
this.a = str;
|
||||
}
|
||||
}
|
||||
}
|
13
sources/com/tencent/bugly/proguard/aj.java
Normal file
13
sources/com/tencent/bugly/proguard/aj.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public interface aj {
|
||||
void a(String str);
|
||||
|
||||
byte[] a(byte[] bArr) throws Exception;
|
||||
|
||||
byte[] b(byte[] bArr) throws Exception, NoSuchAlgorithmException;
|
||||
}
|
45
sources/com/tencent/bugly/proguard/ak.java
Normal file
45
sources/com/tencent/bugly/proguard/ak.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class ak extends k implements Cloneable {
|
||||
public String a = "";
|
||||
public String b = "";
|
||||
public String c = "";
|
||||
private String e = "";
|
||||
public String d = "";
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 0);
|
||||
String str = this.b;
|
||||
if (str != null) {
|
||||
jVar.a(str, 1);
|
||||
}
|
||||
String str2 = this.c;
|
||||
if (str2 != null) {
|
||||
jVar.a(str2, 2);
|
||||
}
|
||||
String str3 = this.e;
|
||||
if (str3 != null) {
|
||||
jVar.a(str3, 3);
|
||||
}
|
||||
String str4 = this.d;
|
||||
if (str4 != null) {
|
||||
jVar.a(str4, 4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(StringBuilder sb, int i) {
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
this.a = iVar.b(0, true);
|
||||
this.b = iVar.b(1, false);
|
||||
this.c = iVar.b(2, false);
|
||||
this.e = iVar.b(3, false);
|
||||
this.d = iVar.b(4, false);
|
||||
}
|
||||
}
|
35
sources/com/tencent/bugly/proguard/al.java
Normal file
35
sources/com/tencent/bugly/proguard/al.java
Normal file
@@ -0,0 +1,35 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class al extends k implements Cloneable {
|
||||
private static ArrayList<String> c;
|
||||
private String a = "";
|
||||
private ArrayList<String> b = null;
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 0);
|
||||
ArrayList<String> arrayList = this.b;
|
||||
if (arrayList != null) {
|
||||
jVar.a((Collection) arrayList, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(StringBuilder sb, int i) {
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
this.a = iVar.b(0, true);
|
||||
if (c == null) {
|
||||
c = new ArrayList<>();
|
||||
c.add("");
|
||||
}
|
||||
this.b = (ArrayList) iVar.a((i) c, 1, false);
|
||||
}
|
||||
}
|
49
sources/com/tencent/bugly/proguard/am.java
Normal file
49
sources/com/tencent/bugly/proguard/am.java
Normal file
@@ -0,0 +1,49 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class am extends k implements Cloneable {
|
||||
private static byte[] d;
|
||||
private byte a;
|
||||
private String b;
|
||||
private byte[] c;
|
||||
|
||||
public am() {
|
||||
this.a = (byte) 0;
|
||||
this.b = "";
|
||||
this.c = null;
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 0);
|
||||
jVar.a(this.b, 1);
|
||||
byte[] bArr = this.c;
|
||||
if (bArr != null) {
|
||||
jVar.a(bArr, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(StringBuilder sb, int i) {
|
||||
}
|
||||
|
||||
public am(byte b, String str, byte[] bArr) {
|
||||
this.a = (byte) 0;
|
||||
this.b = "";
|
||||
this.c = null;
|
||||
this.a = b;
|
||||
this.b = str;
|
||||
this.c = bArr;
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
this.a = iVar.a(this.a, 0, true);
|
||||
this.b = iVar.b(1, true);
|
||||
if (d == null) {
|
||||
d = new byte[]{0};
|
||||
}
|
||||
this.c = iVar.c(2, false);
|
||||
}
|
||||
}
|
154
sources/com/tencent/bugly/proguard/an.java
Normal file
154
sources/com/tencent/bugly/proguard/an.java
Normal file
@@ -0,0 +1,154 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class an extends k {
|
||||
private static ArrayList<am> A;
|
||||
private static Map<String, String> B;
|
||||
private static Map<String, String> C;
|
||||
private static Map<String, String> v = new HashMap();
|
||||
private static al w;
|
||||
private static ak x;
|
||||
private static ArrayList<ak> y;
|
||||
private static ArrayList<ak> z;
|
||||
public String a = "";
|
||||
public long b = 0;
|
||||
public String c = "";
|
||||
public String d = "";
|
||||
public String e = "";
|
||||
public String f = "";
|
||||
public String g = "";
|
||||
public Map<String, String> h = null;
|
||||
public String i = "";
|
||||
public al j = null;
|
||||
public int k = 0;
|
||||
public String l = "";
|
||||
public String m = "";
|
||||
public ak n = null;
|
||||
public ArrayList<ak> o = null;
|
||||
public ArrayList<ak> p = null;
|
||||
public ArrayList<am> q = null;
|
||||
public Map<String, String> r = null;
|
||||
public Map<String, String> s = null;
|
||||
public String t = "";
|
||||
private boolean u = true;
|
||||
|
||||
static {
|
||||
v.put("", "");
|
||||
w = new al();
|
||||
x = new ak();
|
||||
y = new ArrayList<>();
|
||||
y.add(new ak());
|
||||
z = new ArrayList<>();
|
||||
z.add(new ak());
|
||||
A = new ArrayList<>();
|
||||
A.add(new am());
|
||||
B = new HashMap();
|
||||
B.put("", "");
|
||||
C = new HashMap();
|
||||
C.put("", "");
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 0);
|
||||
jVar.a(this.b, 1);
|
||||
jVar.a(this.c, 2);
|
||||
String str = this.d;
|
||||
if (str != null) {
|
||||
jVar.a(str, 3);
|
||||
}
|
||||
String str2 = this.e;
|
||||
if (str2 != null) {
|
||||
jVar.a(str2, 4);
|
||||
}
|
||||
String str3 = this.f;
|
||||
if (str3 != null) {
|
||||
jVar.a(str3, 5);
|
||||
}
|
||||
String str4 = this.g;
|
||||
if (str4 != null) {
|
||||
jVar.a(str4, 6);
|
||||
}
|
||||
Map<String, String> map = this.h;
|
||||
if (map != null) {
|
||||
jVar.a((Map) map, 7);
|
||||
}
|
||||
String str5 = this.i;
|
||||
if (str5 != null) {
|
||||
jVar.a(str5, 8);
|
||||
}
|
||||
al alVar = this.j;
|
||||
if (alVar != null) {
|
||||
jVar.a((k) alVar, 9);
|
||||
}
|
||||
jVar.a(this.k, 10);
|
||||
String str6 = this.l;
|
||||
if (str6 != null) {
|
||||
jVar.a(str6, 11);
|
||||
}
|
||||
String str7 = this.m;
|
||||
if (str7 != null) {
|
||||
jVar.a(str7, 12);
|
||||
}
|
||||
ak akVar = this.n;
|
||||
if (akVar != null) {
|
||||
jVar.a((k) akVar, 13);
|
||||
}
|
||||
ArrayList<ak> arrayList = this.o;
|
||||
if (arrayList != null) {
|
||||
jVar.a((Collection) arrayList, 14);
|
||||
}
|
||||
ArrayList<ak> arrayList2 = this.p;
|
||||
if (arrayList2 != null) {
|
||||
jVar.a((Collection) arrayList2, 15);
|
||||
}
|
||||
ArrayList<am> arrayList3 = this.q;
|
||||
if (arrayList3 != null) {
|
||||
jVar.a((Collection) arrayList3, 16);
|
||||
}
|
||||
Map<String, String> map2 = this.r;
|
||||
if (map2 != null) {
|
||||
jVar.a((Map) map2, 17);
|
||||
}
|
||||
Map<String, String> map3 = this.s;
|
||||
if (map3 != null) {
|
||||
jVar.a((Map) map3, 18);
|
||||
}
|
||||
String str8 = this.t;
|
||||
if (str8 != null) {
|
||||
jVar.a(str8, 19);
|
||||
}
|
||||
jVar.a(this.u, 20);
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
this.a = iVar.b(0, true);
|
||||
this.b = iVar.a(this.b, 1, true);
|
||||
this.c = iVar.b(2, true);
|
||||
this.d = iVar.b(3, false);
|
||||
this.e = iVar.b(4, false);
|
||||
this.f = iVar.b(5, false);
|
||||
this.g = iVar.b(6, false);
|
||||
this.h = (Map) iVar.a((i) v, 7, false);
|
||||
this.i = iVar.b(8, false);
|
||||
this.j = (al) iVar.a((k) w, 9, false);
|
||||
this.k = iVar.a(this.k, 10, false);
|
||||
this.l = iVar.b(11, false);
|
||||
this.m = iVar.b(12, false);
|
||||
this.n = (ak) iVar.a((k) x, 13, false);
|
||||
this.o = (ArrayList) iVar.a((i) y, 14, false);
|
||||
this.p = (ArrayList) iVar.a((i) z, 15, false);
|
||||
this.q = (ArrayList) iVar.a((i) A, 16, false);
|
||||
this.r = (Map) iVar.a((i) B, 17, false);
|
||||
this.s = (Map) iVar.a((i) C, 18, false);
|
||||
this.t = iVar.b(19, false);
|
||||
this.u = iVar.a(20, false);
|
||||
}
|
||||
}
|
29
sources/com/tencent/bugly/proguard/ao.java
Normal file
29
sources/com/tencent/bugly/proguard/ao.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class ao extends k implements Cloneable {
|
||||
private static ArrayList<an> b;
|
||||
public ArrayList<an> a = null;
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a((Collection) this.a, 0);
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(StringBuilder sb, int i) {
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
if (b == null) {
|
||||
b = new ArrayList<>();
|
||||
b.add(new an());
|
||||
}
|
||||
this.a = (ArrayList) iVar.a((i) b, 0, true);
|
||||
}
|
||||
}
|
140
sources/com/tencent/bugly/proguard/ap.java
Normal file
140
sources/com/tencent/bugly/proguard/ap.java
Normal file
@@ -0,0 +1,140 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class ap extends k {
|
||||
private static byte[] y = {0};
|
||||
private static Map<String, String> z = new HashMap();
|
||||
public int a = 0;
|
||||
public String b = "";
|
||||
public String c = "";
|
||||
public String d = "";
|
||||
public String e = "";
|
||||
public String f = "";
|
||||
public int g = 0;
|
||||
public byte[] h = null;
|
||||
public String i = "";
|
||||
public String j = "";
|
||||
public Map<String, String> k = null;
|
||||
public String l = "";
|
||||
public long m = 0;
|
||||
public String n = "";
|
||||
public String o = "";
|
||||
public String p = "";
|
||||
public long q = 0;
|
||||
public String r = "";
|
||||
public String s = "";
|
||||
public String t = "";
|
||||
public String u = "";
|
||||
public String v = "";
|
||||
public String w = "";
|
||||
private String x = "";
|
||||
|
||||
static {
|
||||
z.put("", "");
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 0);
|
||||
jVar.a(this.b, 1);
|
||||
jVar.a(this.c, 2);
|
||||
jVar.a(this.d, 3);
|
||||
String str = this.e;
|
||||
if (str != null) {
|
||||
jVar.a(str, 4);
|
||||
}
|
||||
jVar.a(this.f, 5);
|
||||
jVar.a(this.g, 6);
|
||||
jVar.a(this.h, 7);
|
||||
String str2 = this.i;
|
||||
if (str2 != null) {
|
||||
jVar.a(str2, 8);
|
||||
}
|
||||
String str3 = this.j;
|
||||
if (str3 != null) {
|
||||
jVar.a(str3, 9);
|
||||
}
|
||||
Map<String, String> map = this.k;
|
||||
if (map != null) {
|
||||
jVar.a((Map) map, 10);
|
||||
}
|
||||
String str4 = this.l;
|
||||
if (str4 != null) {
|
||||
jVar.a(str4, 11);
|
||||
}
|
||||
jVar.a(this.m, 12);
|
||||
String str5 = this.n;
|
||||
if (str5 != null) {
|
||||
jVar.a(str5, 13);
|
||||
}
|
||||
String str6 = this.o;
|
||||
if (str6 != null) {
|
||||
jVar.a(str6, 14);
|
||||
}
|
||||
String str7 = this.p;
|
||||
if (str7 != null) {
|
||||
jVar.a(str7, 15);
|
||||
}
|
||||
jVar.a(this.q, 16);
|
||||
String str8 = this.r;
|
||||
if (str8 != null) {
|
||||
jVar.a(str8, 17);
|
||||
}
|
||||
String str9 = this.s;
|
||||
if (str9 != null) {
|
||||
jVar.a(str9, 18);
|
||||
}
|
||||
String str10 = this.t;
|
||||
if (str10 != null) {
|
||||
jVar.a(str10, 19);
|
||||
}
|
||||
String str11 = this.u;
|
||||
if (str11 != null) {
|
||||
jVar.a(str11, 20);
|
||||
}
|
||||
String str12 = this.v;
|
||||
if (str12 != null) {
|
||||
jVar.a(str12, 21);
|
||||
}
|
||||
String str13 = this.w;
|
||||
if (str13 != null) {
|
||||
jVar.a(str13, 22);
|
||||
}
|
||||
String str14 = this.x;
|
||||
if (str14 != null) {
|
||||
jVar.a(str14, 23);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
this.a = iVar.a(this.a, 0, true);
|
||||
this.b = iVar.b(1, true);
|
||||
this.c = iVar.b(2, true);
|
||||
this.d = iVar.b(3, true);
|
||||
this.e = iVar.b(4, false);
|
||||
this.f = iVar.b(5, true);
|
||||
this.g = iVar.a(this.g, 6, true);
|
||||
this.h = iVar.c(7, true);
|
||||
this.i = iVar.b(8, false);
|
||||
this.j = iVar.b(9, false);
|
||||
this.k = (Map) iVar.a((i) z, 10, false);
|
||||
this.l = iVar.b(11, false);
|
||||
this.m = iVar.a(this.m, 12, false);
|
||||
this.n = iVar.b(13, false);
|
||||
this.o = iVar.b(14, false);
|
||||
this.p = iVar.b(15, false);
|
||||
this.q = iVar.a(this.q, 16, false);
|
||||
this.r = iVar.b(17, false);
|
||||
this.s = iVar.b(18, false);
|
||||
this.t = iVar.b(19, false);
|
||||
this.u = iVar.b(20, false);
|
||||
this.v = iVar.b(21, false);
|
||||
this.w = iVar.b(22, false);
|
||||
this.x = iVar.b(23, false);
|
||||
}
|
||||
}
|
62
sources/com/tencent/bugly/proguard/aq.java
Normal file
62
sources/com/tencent/bugly/proguard/aq.java
Normal file
@@ -0,0 +1,62 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class aq extends k {
|
||||
private static byte[] i = {0};
|
||||
private static Map<String, String> j = new HashMap();
|
||||
public byte a = 0;
|
||||
public int b = 0;
|
||||
public byte[] c = null;
|
||||
public String d = "";
|
||||
public long e = 0;
|
||||
private String h = "";
|
||||
public String f = "";
|
||||
public Map<String, String> g = null;
|
||||
|
||||
static {
|
||||
j.put("", "");
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 0);
|
||||
jVar.a(this.b, 1);
|
||||
byte[] bArr = this.c;
|
||||
if (bArr != null) {
|
||||
jVar.a(bArr, 2);
|
||||
}
|
||||
String str = this.d;
|
||||
if (str != null) {
|
||||
jVar.a(str, 3);
|
||||
}
|
||||
jVar.a(this.e, 4);
|
||||
String str2 = this.h;
|
||||
if (str2 != null) {
|
||||
jVar.a(str2, 5);
|
||||
}
|
||||
String str3 = this.f;
|
||||
if (str3 != null) {
|
||||
jVar.a(str3, 6);
|
||||
}
|
||||
Map<String, String> map = this.g;
|
||||
if (map != null) {
|
||||
jVar.a((Map) map, 7);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
this.a = iVar.a(this.a, 0, true);
|
||||
this.b = iVar.a(this.b, 1, true);
|
||||
this.c = iVar.c(2, false);
|
||||
this.d = iVar.b(3, false);
|
||||
this.e = iVar.a(this.e, 4, false);
|
||||
this.h = iVar.b(5, false);
|
||||
this.f = iVar.b(6, false);
|
||||
this.g = (Map) iVar.a((i) j, 7, false);
|
||||
}
|
||||
}
|
24
sources/com/tencent/bugly/proguard/ar.java
Normal file
24
sources/com/tencent/bugly/proguard/ar.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class ar extends k implements Cloneable {
|
||||
public String a = "";
|
||||
private String b = "";
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 0);
|
||||
jVar.a(this.b, 1);
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(StringBuilder sb, int i) {
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
this.a = iVar.b(0, true);
|
||||
this.b = iVar.b(1, true);
|
||||
}
|
||||
}
|
123
sources/com/tencent/bugly/proguard/as.java
Normal file
123
sources/com/tencent/bugly/proguard/as.java
Normal file
@@ -0,0 +1,123 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class as extends k implements Cloneable {
|
||||
private static /* synthetic */ boolean o = !as.class.desiredAssertionStatus();
|
||||
private static ar m = new ar();
|
||||
private static Map<String, String> n = new HashMap();
|
||||
public boolean a = true;
|
||||
public boolean b = true;
|
||||
public boolean c = true;
|
||||
public String d = "";
|
||||
public String e = "";
|
||||
public ar f = null;
|
||||
public Map<String, String> g = null;
|
||||
public long h = 0;
|
||||
private String j = "";
|
||||
private String k = "";
|
||||
private int l = 0;
|
||||
public int i = 0;
|
||||
|
||||
static {
|
||||
n.put("", "");
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 0);
|
||||
jVar.a(this.b, 1);
|
||||
jVar.a(this.c, 2);
|
||||
String str = this.d;
|
||||
if (str != null) {
|
||||
jVar.a(str, 3);
|
||||
}
|
||||
String str2 = this.e;
|
||||
if (str2 != null) {
|
||||
jVar.a(str2, 4);
|
||||
}
|
||||
ar arVar = this.f;
|
||||
if (arVar != null) {
|
||||
jVar.a((k) arVar, 5);
|
||||
}
|
||||
Map<String, String> map = this.g;
|
||||
if (map != null) {
|
||||
jVar.a((Map) map, 6);
|
||||
}
|
||||
jVar.a(this.h, 7);
|
||||
String str3 = this.j;
|
||||
if (str3 != null) {
|
||||
jVar.a(str3, 8);
|
||||
}
|
||||
String str4 = this.k;
|
||||
if (str4 != null) {
|
||||
jVar.a(str4, 9);
|
||||
}
|
||||
jVar.a(this.l, 10);
|
||||
jVar.a(this.i, 11);
|
||||
}
|
||||
|
||||
public final Object clone() {
|
||||
try {
|
||||
return super.clone();
|
||||
} catch (CloneNotSupportedException unused) {
|
||||
if (o) {
|
||||
return null;
|
||||
}
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
as asVar = (as) obj;
|
||||
return l.a(this.a, asVar.a) && l.a(this.b, asVar.b) && l.a(this.c, asVar.c) && l.a(this.d, asVar.d) && l.a(this.e, asVar.e) && l.a(this.f, asVar.f) && l.a(this.g, asVar.g) && l.a(this.h, asVar.h) && l.a(this.j, asVar.j) && l.a(this.k, asVar.k) && l.a(this.l, asVar.l) && l.a(this.i, asVar.i);
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
try {
|
||||
throw new Exception("Need define key first!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
this.a = iVar.a(0, true);
|
||||
this.b = iVar.a(1, true);
|
||||
this.c = iVar.a(2, true);
|
||||
this.d = iVar.b(3, false);
|
||||
this.e = iVar.b(4, false);
|
||||
this.f = (ar) iVar.a((k) m, 5, false);
|
||||
this.g = (Map) iVar.a((i) n, 6, false);
|
||||
this.h = iVar.a(this.h, 7, false);
|
||||
this.j = iVar.b(8, false);
|
||||
this.k = iVar.b(9, false);
|
||||
this.l = iVar.a(this.l, 10, false);
|
||||
this.i = iVar.a(this.i, 11, false);
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(StringBuilder sb, int i) {
|
||||
h hVar = new h(sb, i);
|
||||
hVar.a(this.a, "enable");
|
||||
hVar.a(this.b, "enableUserInfo");
|
||||
hVar.a(this.c, "enableQuery");
|
||||
hVar.a(this.d, "url");
|
||||
hVar.a(this.e, "expUrl");
|
||||
hVar.a((k) this.f, "security");
|
||||
hVar.a((Map) this.g, "valueMap");
|
||||
hVar.a(this.h, "strategylastUpdateTime");
|
||||
hVar.a(this.j, "httpsUrl");
|
||||
hVar.a(this.k, "httpsExpUrl");
|
||||
hVar.a(this.l, "eventRecordCount");
|
||||
hVar.a(this.i, "eventTimeInterval");
|
||||
}
|
||||
}
|
61
sources/com/tencent/bugly/proguard/at.java
Normal file
61
sources/com/tencent/bugly/proguard/at.java
Normal file
@@ -0,0 +1,61 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class at extends k {
|
||||
private static Map<String, String> i = new HashMap();
|
||||
public long a = 0;
|
||||
public byte b = 0;
|
||||
public String c = "";
|
||||
public String d = "";
|
||||
public String e = "";
|
||||
public Map<String, String> f = null;
|
||||
public String g = "";
|
||||
public boolean h = true;
|
||||
|
||||
static {
|
||||
i.put("", "");
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 0);
|
||||
jVar.a(this.b, 1);
|
||||
String str = this.c;
|
||||
if (str != null) {
|
||||
jVar.a(str, 2);
|
||||
}
|
||||
String str2 = this.d;
|
||||
if (str2 != null) {
|
||||
jVar.a(str2, 3);
|
||||
}
|
||||
String str3 = this.e;
|
||||
if (str3 != null) {
|
||||
jVar.a(str3, 4);
|
||||
}
|
||||
Map<String, String> map = this.f;
|
||||
if (map != null) {
|
||||
jVar.a((Map) map, 5);
|
||||
}
|
||||
String str4 = this.g;
|
||||
if (str4 != null) {
|
||||
jVar.a(str4, 6);
|
||||
}
|
||||
jVar.a(this.h, 7);
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
this.a = iVar.a(this.a, 0, true);
|
||||
this.b = iVar.a(this.b, 1, true);
|
||||
this.c = iVar.b(2, false);
|
||||
this.d = iVar.b(3, false);
|
||||
this.e = iVar.b(4, false);
|
||||
this.f = (Map) iVar.a((i) i, 5, false);
|
||||
this.g = iVar.b(6, false);
|
||||
this.h = iVar.a(7, false);
|
||||
}
|
||||
}
|
60
sources/com/tencent/bugly/proguard/au.java
Normal file
60
sources/com/tencent/bugly/proguard/au.java
Normal file
@@ -0,0 +1,60 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class au extends k implements Cloneable {
|
||||
private static ArrayList<at> f;
|
||||
private static Map<String, String> g;
|
||||
public byte a = 0;
|
||||
public String b = "";
|
||||
public String c = "";
|
||||
public ArrayList<at> d = null;
|
||||
public Map<String, String> e = null;
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 0);
|
||||
String str = this.b;
|
||||
if (str != null) {
|
||||
jVar.a(str, 1);
|
||||
}
|
||||
String str2 = this.c;
|
||||
if (str2 != null) {
|
||||
jVar.a(str2, 2);
|
||||
}
|
||||
ArrayList<at> arrayList = this.d;
|
||||
if (arrayList != null) {
|
||||
jVar.a((Collection) arrayList, 3);
|
||||
}
|
||||
Map<String, String> map = this.e;
|
||||
if (map != null) {
|
||||
jVar.a((Map) map, 4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(StringBuilder sb, int i) {
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
this.a = iVar.a(this.a, 0, true);
|
||||
this.b = iVar.b(1, false);
|
||||
this.c = iVar.b(2, false);
|
||||
if (f == null) {
|
||||
f = new ArrayList<>();
|
||||
f.add(new at());
|
||||
}
|
||||
this.d = (ArrayList) iVar.a((i) f, 3, false);
|
||||
if (g == null) {
|
||||
g = new HashMap();
|
||||
g.put("", "");
|
||||
}
|
||||
this.e = (Map) iVar.a((i) g, 4, false);
|
||||
}
|
||||
}
|
13
sources/com/tencent/bugly/proguard/b.java
Normal file
13
sources/com/tencent/bugly/proguard/b.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public class b extends RuntimeException {
|
||||
public b(String str) {
|
||||
super(str);
|
||||
}
|
||||
|
||||
public b(Exception exc) {
|
||||
super(exc);
|
||||
}
|
||||
}
|
113
sources/com/tencent/bugly/proguard/c.java
Normal file
113
sources/com/tencent/bugly/proguard/c.java
Normal file
@@ -0,0 +1,113 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public class c extends a {
|
||||
protected HashMap<String, byte[]> d = null;
|
||||
private HashMap<String, Object> e = new HashMap<>();
|
||||
private i f = new i();
|
||||
|
||||
@Override // com.tencent.bugly.proguard.a
|
||||
public final /* bridge */ /* synthetic */ void a(String str) {
|
||||
super.a(str);
|
||||
}
|
||||
|
||||
public final <T> T b(String str, T t) throws b {
|
||||
HashMap<String, byte[]> hashMap = this.d;
|
||||
if (hashMap != null) {
|
||||
if (!hashMap.containsKey(str)) {
|
||||
return null;
|
||||
}
|
||||
if (this.e.containsKey(str)) {
|
||||
return (T) this.e.get(str);
|
||||
}
|
||||
try {
|
||||
this.f.a(this.d.get(str));
|
||||
this.f.a(this.b);
|
||||
T t2 = (T) this.f.a((i) t, 0, true);
|
||||
if (t2 != null) {
|
||||
this.e.put(str, t2);
|
||||
}
|
||||
return t2;
|
||||
} catch (Exception e) {
|
||||
throw new b(e);
|
||||
}
|
||||
}
|
||||
if (!this.a.containsKey(str)) {
|
||||
return null;
|
||||
}
|
||||
if (this.e.containsKey(str)) {
|
||||
return (T) this.e.get(str);
|
||||
}
|
||||
byte[] bArr = new byte[0];
|
||||
Iterator<Map.Entry<String, byte[]>> it = this.a.get(str).entrySet().iterator();
|
||||
if (it.hasNext()) {
|
||||
Map.Entry<String, byte[]> next = it.next();
|
||||
next.getKey();
|
||||
bArr = next.getValue();
|
||||
}
|
||||
try {
|
||||
this.f.a(bArr);
|
||||
this.f.a(this.b);
|
||||
T t3 = (T) this.f.a((i) t, 0, true);
|
||||
this.e.put(str, t3);
|
||||
return t3;
|
||||
} catch (Exception e2) {
|
||||
throw new b(e2);
|
||||
}
|
||||
}
|
||||
|
||||
public void c() {
|
||||
this.d = new HashMap<>();
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.a
|
||||
public <T> void a(String str, T t) {
|
||||
if (this.d == null) {
|
||||
super.a(str, (String) t);
|
||||
return;
|
||||
}
|
||||
if (str == null) {
|
||||
throw new IllegalArgumentException("put key can not is null");
|
||||
}
|
||||
if (t == null) {
|
||||
throw new IllegalArgumentException("put value can not is null");
|
||||
}
|
||||
if (t instanceof Set) {
|
||||
throw new IllegalArgumentException("can not support Set");
|
||||
}
|
||||
j jVar = new j();
|
||||
jVar.a(this.b);
|
||||
jVar.a(t, 0);
|
||||
this.d.put(str, l.a(jVar.a()));
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.a
|
||||
public byte[] a() {
|
||||
if (this.d != null) {
|
||||
j jVar = new j(0);
|
||||
jVar.a(this.b);
|
||||
jVar.a((Map) this.d, 0);
|
||||
return l.a(jVar.a());
|
||||
}
|
||||
return super.a();
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.a
|
||||
public void a(byte[] bArr) {
|
||||
try {
|
||||
super.a(bArr);
|
||||
} catch (Exception unused) {
|
||||
this.f.a(bArr);
|
||||
this.f.a(this.b);
|
||||
HashMap hashMap = new HashMap(1);
|
||||
hashMap.put("", new byte[0]);
|
||||
this.d = this.f.a((Map) hashMap, 0, false);
|
||||
}
|
||||
}
|
||||
}
|
118
sources/com/tencent/bugly/proguard/d.java
Normal file
118
sources/com/tencent/bugly/proguard/d.java
Normal file
@@ -0,0 +1,118 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class d extends c {
|
||||
private static HashMap<String, byte[]> f;
|
||||
private static HashMap<String, HashMap<String, byte[]>> g;
|
||||
private f e = new f();
|
||||
|
||||
public d() {
|
||||
this.e.a = (short) 2;
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.c, com.tencent.bugly.proguard.a
|
||||
public final <T> void a(String str, T t) {
|
||||
if (!str.startsWith(".")) {
|
||||
super.a(str, (String) t);
|
||||
} else {
|
||||
throw new IllegalArgumentException("put name can not startwith . , now is " + str);
|
||||
}
|
||||
}
|
||||
|
||||
public final void b(String str) {
|
||||
this.e.c = str;
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.c
|
||||
public final void c() {
|
||||
super.c();
|
||||
this.e.a = (short) 3;
|
||||
}
|
||||
|
||||
public final void b(int i) {
|
||||
this.e.b = 1;
|
||||
}
|
||||
|
||||
public final void c(String str) {
|
||||
this.e.d = str;
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.c, com.tencent.bugly.proguard.a
|
||||
public final byte[] a() {
|
||||
f fVar = this.e;
|
||||
if (fVar.a == 2) {
|
||||
if (!fVar.c.equals("")) {
|
||||
if (this.e.d.equals("")) {
|
||||
throw new IllegalArgumentException("funcName can not is null");
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("servantName can not is null");
|
||||
}
|
||||
} else {
|
||||
if (fVar.c == null) {
|
||||
fVar.c = "";
|
||||
}
|
||||
f fVar2 = this.e;
|
||||
if (fVar2.d == null) {
|
||||
fVar2.d = "";
|
||||
}
|
||||
}
|
||||
j jVar = new j(0);
|
||||
jVar.a(this.b);
|
||||
if (this.e.a == 2) {
|
||||
jVar.a((Map) this.a, 0);
|
||||
} else {
|
||||
jVar.a((Map) ((c) this).d, 0);
|
||||
}
|
||||
this.e.e = l.a(jVar.a());
|
||||
j jVar2 = new j(0);
|
||||
jVar2.a(this.b);
|
||||
this.e.a(jVar2);
|
||||
byte[] a = l.a(jVar2.a());
|
||||
int length = a.length + 4;
|
||||
ByteBuffer allocate = ByteBuffer.allocate(length);
|
||||
allocate.putInt(length).put(a).flip();
|
||||
return allocate.array();
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.c, com.tencent.bugly.proguard.a
|
||||
public final void a(byte[] bArr) {
|
||||
if (bArr.length >= 4) {
|
||||
try {
|
||||
i iVar = new i(bArr, 4);
|
||||
iVar.a(this.b);
|
||||
this.e.a(iVar);
|
||||
if (this.e.a == 3) {
|
||||
i iVar2 = new i(this.e.e);
|
||||
iVar2.a(this.b);
|
||||
if (f == null) {
|
||||
HashMap<String, byte[]> hashMap = new HashMap<>();
|
||||
f = hashMap;
|
||||
hashMap.put("", new byte[0]);
|
||||
}
|
||||
((c) this).d = iVar2.a((Map) f, 0, false);
|
||||
return;
|
||||
}
|
||||
i iVar3 = new i(this.e.e);
|
||||
iVar3.a(this.b);
|
||||
if (g == null) {
|
||||
g = new HashMap<>();
|
||||
HashMap<String, byte[]> hashMap2 = new HashMap<>();
|
||||
hashMap2.put("", new byte[0]);
|
||||
g.put("", hashMap2);
|
||||
}
|
||||
this.a = iVar3.a((Map) g, 0, false);
|
||||
new HashMap();
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("decode package must include size head");
|
||||
}
|
||||
}
|
22
sources/com/tencent/bugly/proguard/e.java
Normal file
22
sources/com/tencent/bugly/proguard/e.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class e {
|
||||
private static final char[] a = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
||||
|
||||
public static String a(byte[] bArr) {
|
||||
if (bArr == null || bArr.length == 0) {
|
||||
return null;
|
||||
}
|
||||
char[] cArr = new char[bArr.length * 2];
|
||||
for (int i = 0; i < bArr.length; i++) {
|
||||
byte b = bArr[i];
|
||||
int i2 = i * 2;
|
||||
char[] cArr2 = a;
|
||||
cArr[i2 + 1] = cArr2[b & 15];
|
||||
cArr[i2] = cArr2[((byte) (b >>> 4)) & 15];
|
||||
}
|
||||
return new String(cArr);
|
||||
}
|
||||
}
|
101
sources/com/tencent/bugly/proguard/f.java
Normal file
101
sources/com/tencent/bugly/proguard/f.java
Normal file
@@ -0,0 +1,101 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import com.liulishuo.filedownloader.model.FileDownloadModel;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class f extends k {
|
||||
public byte[] e;
|
||||
private Map<String, String> i;
|
||||
private Map<String, String> j;
|
||||
private static /* synthetic */ boolean m = !f.class.desiredAssertionStatus();
|
||||
private static byte[] k = null;
|
||||
private static Map<String, String> l = null;
|
||||
public short a = 0;
|
||||
private byte f = 0;
|
||||
private int g = 0;
|
||||
public int b = 0;
|
||||
public String c = null;
|
||||
public String d = null;
|
||||
private int h = 0;
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(j jVar) {
|
||||
jVar.a(this.a, 1);
|
||||
jVar.a(this.f, 2);
|
||||
jVar.a(this.g, 3);
|
||||
jVar.a(this.b, 4);
|
||||
jVar.a(this.c, 5);
|
||||
jVar.a(this.d, 6);
|
||||
jVar.a(this.e, 7);
|
||||
jVar.a(this.h, 8);
|
||||
jVar.a((Map) this.i, 9);
|
||||
jVar.a((Map) this.j, 10);
|
||||
}
|
||||
|
||||
public final Object clone() {
|
||||
try {
|
||||
return super.clone();
|
||||
} catch (CloneNotSupportedException unused) {
|
||||
if (m) {
|
||||
return null;
|
||||
}
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
f fVar = (f) obj;
|
||||
return l.a(1, (int) fVar.a) && l.a(1, (int) fVar.f) && l.a(1, fVar.g) && l.a(1, fVar.b) && l.a((Object) 1, (Object) fVar.c) && l.a((Object) 1, (Object) fVar.d) && l.a((Object) 1, (Object) fVar.e) && l.a(1, fVar.h) && l.a((Object) 1, (Object) fVar.i) && l.a((Object) 1, (Object) fVar.j);
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(i iVar) {
|
||||
try {
|
||||
this.a = iVar.a(this.a, 1, true);
|
||||
this.f = iVar.a(this.f, 2, true);
|
||||
this.g = iVar.a(this.g, 3, true);
|
||||
this.b = iVar.a(this.b, 4, true);
|
||||
this.c = iVar.b(5, true);
|
||||
this.d = iVar.b(6, true);
|
||||
if (k == null) {
|
||||
k = new byte[]{0};
|
||||
}
|
||||
this.e = iVar.c(7, true);
|
||||
this.h = iVar.a(this.h, 8, true);
|
||||
if (l == null) {
|
||||
HashMap hashMap = new HashMap();
|
||||
l = hashMap;
|
||||
hashMap.put("", "");
|
||||
}
|
||||
this.i = (Map) iVar.a((i) l, 9, true);
|
||||
if (l == null) {
|
||||
HashMap hashMap2 = new HashMap();
|
||||
l = hashMap2;
|
||||
hashMap2.put("", "");
|
||||
}
|
||||
this.j = (Map) iVar.a((i) l, 10, true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("RequestPacket decode error " + e.a(this.e));
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.tencent.bugly.proguard.k
|
||||
public final void a(StringBuilder sb, int i) {
|
||||
h hVar = new h(sb, i);
|
||||
hVar.a(this.a, "iVersion");
|
||||
hVar.a(this.f, "cPacketType");
|
||||
hVar.a(this.g, "iMessageType");
|
||||
hVar.a(this.b, "iRequestId");
|
||||
hVar.a(this.c, "sServantName");
|
||||
hVar.a(this.d, "sFuncName");
|
||||
hVar.a(this.e, "sBuffer");
|
||||
hVar.a(this.h, "iTimeout");
|
||||
hVar.a((Map) this.i, "context");
|
||||
hVar.a((Map) this.j, FileDownloadModel.STATUS);
|
||||
}
|
||||
}
|
9
sources/com/tencent/bugly/proguard/g.java
Normal file
9
sources/com/tencent/bugly/proguard/g.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class g extends RuntimeException {
|
||||
public g(String str) {
|
||||
super(str);
|
||||
}
|
||||
}
|
405
sources/com/tencent/bugly/proguard/h.java
Normal file
405
sources/com/tencent/bugly/proguard/h.java
Normal file
@@ -0,0 +1,405 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class h {
|
||||
private StringBuilder a;
|
||||
private int b;
|
||||
|
||||
public h(StringBuilder sb, int i) {
|
||||
this.b = 0;
|
||||
this.a = sb;
|
||||
this.b = i;
|
||||
}
|
||||
|
||||
private void a(String str) {
|
||||
for (int i = 0; i < this.b; i++) {
|
||||
this.a.append('\t');
|
||||
}
|
||||
if (str != null) {
|
||||
StringBuilder sb = this.a;
|
||||
sb.append(str);
|
||||
sb.append(": ");
|
||||
}
|
||||
}
|
||||
|
||||
public final h a(boolean z, String str) {
|
||||
a(str);
|
||||
StringBuilder sb = this.a;
|
||||
sb.append(z ? 'T' : 'F');
|
||||
sb.append('\n');
|
||||
return this;
|
||||
}
|
||||
|
||||
public final h a(byte b, String str) {
|
||||
a(str);
|
||||
StringBuilder sb = this.a;
|
||||
sb.append((int) b);
|
||||
sb.append('\n');
|
||||
return this;
|
||||
}
|
||||
|
||||
public final h a(short s, String str) {
|
||||
a(str);
|
||||
StringBuilder sb = this.a;
|
||||
sb.append((int) s);
|
||||
sb.append('\n');
|
||||
return this;
|
||||
}
|
||||
|
||||
public final h a(int i, String str) {
|
||||
a(str);
|
||||
StringBuilder sb = this.a;
|
||||
sb.append(i);
|
||||
sb.append('\n');
|
||||
return this;
|
||||
}
|
||||
|
||||
public final h a(long j, String str) {
|
||||
a(str);
|
||||
StringBuilder sb = this.a;
|
||||
sb.append(j);
|
||||
sb.append('\n');
|
||||
return this;
|
||||
}
|
||||
|
||||
public final h a(String str, String str2) {
|
||||
a(str2);
|
||||
if (str == null) {
|
||||
this.a.append("null\n");
|
||||
} else {
|
||||
StringBuilder sb = this.a;
|
||||
sb.append(str);
|
||||
sb.append('\n');
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public final h a(byte[] bArr, String str) {
|
||||
a(str);
|
||||
if (bArr == null) {
|
||||
this.a.append("null\n");
|
||||
return this;
|
||||
}
|
||||
if (bArr.length == 0) {
|
||||
StringBuilder sb = this.a;
|
||||
sb.append(bArr.length);
|
||||
sb.append(", []\n");
|
||||
return this;
|
||||
}
|
||||
StringBuilder sb2 = this.a;
|
||||
sb2.append(bArr.length);
|
||||
sb2.append(", [\n");
|
||||
h hVar = new h(this.a, this.b + 1);
|
||||
for (byte b : bArr) {
|
||||
hVar.a(null);
|
||||
StringBuilder sb3 = hVar.a;
|
||||
sb3.append((int) b);
|
||||
sb3.append('\n');
|
||||
}
|
||||
a(null);
|
||||
StringBuilder sb4 = this.a;
|
||||
sb4.append(']');
|
||||
sb4.append('\n');
|
||||
return this;
|
||||
}
|
||||
|
||||
public final <K, V> h a(Map<K, V> map, String str) {
|
||||
a(str);
|
||||
if (map == null) {
|
||||
this.a.append("null\n");
|
||||
return this;
|
||||
}
|
||||
if (map.isEmpty()) {
|
||||
StringBuilder sb = this.a;
|
||||
sb.append(map.size());
|
||||
sb.append(", {}\n");
|
||||
return this;
|
||||
}
|
||||
StringBuilder sb2 = this.a;
|
||||
sb2.append(map.size());
|
||||
sb2.append(", {\n");
|
||||
h hVar = new h(this.a, this.b + 1);
|
||||
h hVar2 = new h(this.a, this.b + 2);
|
||||
for (Map.Entry<K, V> entry : map.entrySet()) {
|
||||
hVar.a(null);
|
||||
StringBuilder sb3 = hVar.a;
|
||||
sb3.append('(');
|
||||
sb3.append('\n');
|
||||
hVar2.a((h) entry.getKey(), (String) null);
|
||||
hVar2.a((h) entry.getValue(), (String) null);
|
||||
hVar.a(null);
|
||||
StringBuilder sb4 = hVar.a;
|
||||
sb4.append(')');
|
||||
sb4.append('\n');
|
||||
}
|
||||
a(null);
|
||||
StringBuilder sb5 = this.a;
|
||||
sb5.append('}');
|
||||
sb5.append('\n');
|
||||
return this;
|
||||
}
|
||||
|
||||
private <T> h a(T[] tArr, String str) {
|
||||
a(str);
|
||||
if (tArr == null) {
|
||||
this.a.append("null\n");
|
||||
return this;
|
||||
}
|
||||
if (tArr.length == 0) {
|
||||
StringBuilder sb = this.a;
|
||||
sb.append(tArr.length);
|
||||
sb.append(", []\n");
|
||||
return this;
|
||||
}
|
||||
StringBuilder sb2 = this.a;
|
||||
sb2.append(tArr.length);
|
||||
sb2.append(", [\n");
|
||||
h hVar = new h(this.a, this.b + 1);
|
||||
for (T t : tArr) {
|
||||
hVar.a((h) t, (String) null);
|
||||
}
|
||||
a(null);
|
||||
StringBuilder sb3 = this.a;
|
||||
sb3.append(']');
|
||||
sb3.append('\n');
|
||||
return this;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private <T> h a(T t, String str) {
|
||||
if (t == 0) {
|
||||
this.a.append("null\n");
|
||||
} else if (t instanceof Byte) {
|
||||
byte byteValue = ((Byte) t).byteValue();
|
||||
a(str);
|
||||
StringBuilder sb = this.a;
|
||||
sb.append((int) byteValue);
|
||||
sb.append('\n');
|
||||
} else if (t instanceof Boolean) {
|
||||
boolean booleanValue = ((Boolean) t).booleanValue();
|
||||
a(str);
|
||||
StringBuilder sb2 = this.a;
|
||||
sb2.append(booleanValue ? 'T' : 'F');
|
||||
sb2.append('\n');
|
||||
} else if (t instanceof Short) {
|
||||
short shortValue = ((Short) t).shortValue();
|
||||
a(str);
|
||||
StringBuilder sb3 = this.a;
|
||||
sb3.append((int) shortValue);
|
||||
sb3.append('\n');
|
||||
} else if (t instanceof Integer) {
|
||||
int intValue = ((Integer) t).intValue();
|
||||
a(str);
|
||||
StringBuilder sb4 = this.a;
|
||||
sb4.append(intValue);
|
||||
sb4.append('\n');
|
||||
} else if (t instanceof Long) {
|
||||
long longValue = ((Long) t).longValue();
|
||||
a(str);
|
||||
StringBuilder sb5 = this.a;
|
||||
sb5.append(longValue);
|
||||
sb5.append('\n');
|
||||
} else if (t instanceof Float) {
|
||||
float floatValue = ((Float) t).floatValue();
|
||||
a(str);
|
||||
StringBuilder sb6 = this.a;
|
||||
sb6.append(floatValue);
|
||||
sb6.append('\n');
|
||||
} else if (t instanceof Double) {
|
||||
double doubleValue = ((Double) t).doubleValue();
|
||||
a(str);
|
||||
StringBuilder sb7 = this.a;
|
||||
sb7.append(doubleValue);
|
||||
sb7.append('\n');
|
||||
} else if (t instanceof String) {
|
||||
a((String) t, str);
|
||||
} else if (t instanceof Map) {
|
||||
a((Map) t, str);
|
||||
} else if (t instanceof List) {
|
||||
List list = (List) t;
|
||||
if (list == null) {
|
||||
a(str);
|
||||
this.a.append("null\t");
|
||||
} else {
|
||||
a(list.toArray(), str);
|
||||
}
|
||||
} else if (t instanceof k) {
|
||||
a((k) t, str);
|
||||
} else if (t instanceof byte[]) {
|
||||
a((byte[]) t, str);
|
||||
} else if (t instanceof boolean[]) {
|
||||
a((h) t, str);
|
||||
} else {
|
||||
int i = 0;
|
||||
if (t instanceof short[]) {
|
||||
short[] sArr = (short[]) t;
|
||||
a(str);
|
||||
if (sArr == null) {
|
||||
this.a.append("null\n");
|
||||
} else if (sArr.length == 0) {
|
||||
StringBuilder sb8 = this.a;
|
||||
sb8.append(sArr.length);
|
||||
sb8.append(", []\n");
|
||||
} else {
|
||||
StringBuilder sb9 = this.a;
|
||||
sb9.append(sArr.length);
|
||||
sb9.append(", [\n");
|
||||
h hVar = new h(this.a, this.b + 1);
|
||||
int length = sArr.length;
|
||||
while (i < length) {
|
||||
short s = sArr[i];
|
||||
hVar.a(null);
|
||||
StringBuilder sb10 = hVar.a;
|
||||
sb10.append((int) s);
|
||||
sb10.append('\n');
|
||||
i++;
|
||||
}
|
||||
a(null);
|
||||
StringBuilder sb11 = this.a;
|
||||
sb11.append(']');
|
||||
sb11.append('\n');
|
||||
}
|
||||
} else if (t instanceof int[]) {
|
||||
int[] iArr = (int[]) t;
|
||||
a(str);
|
||||
if (iArr == null) {
|
||||
this.a.append("null\n");
|
||||
} else if (iArr.length == 0) {
|
||||
StringBuilder sb12 = this.a;
|
||||
sb12.append(iArr.length);
|
||||
sb12.append(", []\n");
|
||||
} else {
|
||||
StringBuilder sb13 = this.a;
|
||||
sb13.append(iArr.length);
|
||||
sb13.append(", [\n");
|
||||
h hVar2 = new h(this.a, this.b + 1);
|
||||
int length2 = iArr.length;
|
||||
while (i < length2) {
|
||||
int i2 = iArr[i];
|
||||
hVar2.a(null);
|
||||
StringBuilder sb14 = hVar2.a;
|
||||
sb14.append(i2);
|
||||
sb14.append('\n');
|
||||
i++;
|
||||
}
|
||||
a(null);
|
||||
StringBuilder sb15 = this.a;
|
||||
sb15.append(']');
|
||||
sb15.append('\n');
|
||||
}
|
||||
} else if (t instanceof long[]) {
|
||||
long[] jArr = (long[]) t;
|
||||
a(str);
|
||||
if (jArr == null) {
|
||||
this.a.append("null\n");
|
||||
} else if (jArr.length == 0) {
|
||||
StringBuilder sb16 = this.a;
|
||||
sb16.append(jArr.length);
|
||||
sb16.append(", []\n");
|
||||
} else {
|
||||
StringBuilder sb17 = this.a;
|
||||
sb17.append(jArr.length);
|
||||
sb17.append(", [\n");
|
||||
h hVar3 = new h(this.a, this.b + 1);
|
||||
int length3 = jArr.length;
|
||||
while (i < length3) {
|
||||
long j = jArr[i];
|
||||
hVar3.a(null);
|
||||
StringBuilder sb18 = hVar3.a;
|
||||
sb18.append(j);
|
||||
sb18.append('\n');
|
||||
i++;
|
||||
}
|
||||
a(null);
|
||||
StringBuilder sb19 = this.a;
|
||||
sb19.append(']');
|
||||
sb19.append('\n');
|
||||
}
|
||||
} else if (t instanceof float[]) {
|
||||
float[] fArr = (float[]) t;
|
||||
a(str);
|
||||
if (fArr == null) {
|
||||
this.a.append("null\n");
|
||||
} else if (fArr.length == 0) {
|
||||
StringBuilder sb20 = this.a;
|
||||
sb20.append(fArr.length);
|
||||
sb20.append(", []\n");
|
||||
} else {
|
||||
StringBuilder sb21 = this.a;
|
||||
sb21.append(fArr.length);
|
||||
sb21.append(", [\n");
|
||||
h hVar4 = new h(this.a, this.b + 1);
|
||||
int length4 = fArr.length;
|
||||
while (i < length4) {
|
||||
float f = fArr[i];
|
||||
hVar4.a(null);
|
||||
StringBuilder sb22 = hVar4.a;
|
||||
sb22.append(f);
|
||||
sb22.append('\n');
|
||||
i++;
|
||||
}
|
||||
a(null);
|
||||
StringBuilder sb23 = this.a;
|
||||
sb23.append(']');
|
||||
sb23.append('\n');
|
||||
}
|
||||
} else if (t instanceof double[]) {
|
||||
double[] dArr = (double[]) t;
|
||||
a(str);
|
||||
if (dArr == null) {
|
||||
this.a.append("null\n");
|
||||
} else if (dArr.length == 0) {
|
||||
StringBuilder sb24 = this.a;
|
||||
sb24.append(dArr.length);
|
||||
sb24.append(", []\n");
|
||||
} else {
|
||||
StringBuilder sb25 = this.a;
|
||||
sb25.append(dArr.length);
|
||||
sb25.append(", [\n");
|
||||
h hVar5 = new h(this.a, this.b + 1);
|
||||
int length5 = dArr.length;
|
||||
while (i < length5) {
|
||||
double d = dArr[i];
|
||||
hVar5.a(null);
|
||||
StringBuilder sb26 = hVar5.a;
|
||||
sb26.append(d);
|
||||
sb26.append('\n');
|
||||
i++;
|
||||
}
|
||||
a(null);
|
||||
StringBuilder sb27 = this.a;
|
||||
sb27.append(']');
|
||||
sb27.append('\n');
|
||||
}
|
||||
} else if (t.getClass().isArray()) {
|
||||
a((Object[]) t, str);
|
||||
} else {
|
||||
throw new b("write object error: unsupport type.");
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public final h a(k kVar, String str) {
|
||||
a(str);
|
||||
StringBuilder sb = this.a;
|
||||
sb.append('{');
|
||||
sb.append('\n');
|
||||
if (kVar == null) {
|
||||
StringBuilder sb2 = this.a;
|
||||
sb2.append('\t');
|
||||
sb2.append("null");
|
||||
} else {
|
||||
kVar.a(this.a, this.b + 1);
|
||||
}
|
||||
a(null);
|
||||
StringBuilder sb3 = this.a;
|
||||
sb3.append('}');
|
||||
sb3.append('\n');
|
||||
return this;
|
||||
}
|
||||
}
|
680
sources/com/tencent/bugly/proguard/i.java
Normal file
680
sources/com/tencent/bugly/proguard/i.java
Normal file
@@ -0,0 +1,680 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import com.ijm.dataencryption.de.DataDecryptTool;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.lang.reflect.Array;
|
||||
import java.nio.BufferUnderflowException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class i {
|
||||
private ByteBuffer a;
|
||||
private String b = "GBK";
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
public static class a {
|
||||
public byte a;
|
||||
public int b;
|
||||
}
|
||||
|
||||
public i() {
|
||||
}
|
||||
|
||||
private boolean[] d(int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
if (aVar.a != 9) {
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
int a2 = a(0, 0, true);
|
||||
if (a2 < 0) {
|
||||
throw new g("size invalid: " + a2);
|
||||
}
|
||||
boolean[] zArr = new boolean[a2];
|
||||
for (int i2 = 0; i2 < a2; i2++) {
|
||||
zArr[i2] = a((byte) 0, 0, true) != 0;
|
||||
}
|
||||
return zArr;
|
||||
}
|
||||
|
||||
private short[] e(int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
if (aVar.a != 9) {
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
int a2 = a(0, 0, true);
|
||||
if (a2 < 0) {
|
||||
throw new g("size invalid: " + a2);
|
||||
}
|
||||
short[] sArr = new short[a2];
|
||||
for (int i2 = 0; i2 < a2; i2++) {
|
||||
sArr[i2] = a(sArr[0], 0, true);
|
||||
}
|
||||
return sArr;
|
||||
}
|
||||
|
||||
private int[] f(int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
if (aVar.a != 9) {
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
int a2 = a(0, 0, true);
|
||||
if (a2 < 0) {
|
||||
throw new g("size invalid: " + a2);
|
||||
}
|
||||
int[] iArr = new int[a2];
|
||||
for (int i2 = 0; i2 < a2; i2++) {
|
||||
iArr[i2] = a(iArr[0], 0, true);
|
||||
}
|
||||
return iArr;
|
||||
}
|
||||
|
||||
private long[] g(int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
if (aVar.a != 9) {
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
int a2 = a(0, 0, true);
|
||||
if (a2 < 0) {
|
||||
throw new g("size invalid: " + a2);
|
||||
}
|
||||
long[] jArr = new long[a2];
|
||||
for (int i2 = 0; i2 < a2; i2++) {
|
||||
jArr[i2] = a(jArr[0], 0, true);
|
||||
}
|
||||
return jArr;
|
||||
}
|
||||
|
||||
private float[] h(int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
if (aVar.a != 9) {
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
int a2 = a(0, 0, true);
|
||||
if (a2 < 0) {
|
||||
throw new g("size invalid: " + a2);
|
||||
}
|
||||
float[] fArr = new float[a2];
|
||||
for (int i2 = 0; i2 < a2; i2++) {
|
||||
fArr[i2] = a(fArr[0], 0, true);
|
||||
}
|
||||
return fArr;
|
||||
}
|
||||
|
||||
private double[] i(int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
if (aVar.a != 9) {
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
int a2 = a(0, 0, true);
|
||||
if (a2 < 0) {
|
||||
throw new g("size invalid: " + a2);
|
||||
}
|
||||
double[] dArr = new double[a2];
|
||||
for (int i2 = 0; i2 < a2; i2++) {
|
||||
dArr[i2] = a(dArr[0], 0, true);
|
||||
}
|
||||
return dArr;
|
||||
}
|
||||
|
||||
public final void a(byte[] bArr) {
|
||||
ByteBuffer byteBuffer = this.a;
|
||||
if (byteBuffer != null) {
|
||||
byteBuffer.clear();
|
||||
}
|
||||
this.a = ByteBuffer.wrap(bArr);
|
||||
}
|
||||
|
||||
public final String b(int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
byte b = aVar.a;
|
||||
if (b == 6) {
|
||||
int i2 = this.a.get();
|
||||
if (i2 < 0) {
|
||||
i2 += DataDecryptTool.DECRYPT_ALL_FILE;
|
||||
}
|
||||
byte[] bArr = new byte[i2];
|
||||
this.a.get(bArr);
|
||||
try {
|
||||
return new String(bArr, this.b);
|
||||
} catch (UnsupportedEncodingException unused) {
|
||||
return new String(bArr);
|
||||
}
|
||||
}
|
||||
if (b != 7) {
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
int i3 = this.a.getInt();
|
||||
if (i3 > 104857600 || i3 < 0) {
|
||||
throw new g("String too long: " + i3);
|
||||
}
|
||||
byte[] bArr2 = new byte[i3];
|
||||
this.a.get(bArr2);
|
||||
try {
|
||||
return new String(bArr2, this.b);
|
||||
} catch (UnsupportedEncodingException unused2) {
|
||||
return new String(bArr2);
|
||||
}
|
||||
}
|
||||
|
||||
public final byte[] c(int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
byte b = aVar.a;
|
||||
if (b == 9) {
|
||||
int a2 = a(0, 0, true);
|
||||
if (a2 < 0) {
|
||||
throw new g("size invalid: " + a2);
|
||||
}
|
||||
byte[] bArr = new byte[a2];
|
||||
for (int i2 = 0; i2 < a2; i2++) {
|
||||
bArr[i2] = a(bArr[0], 0, true);
|
||||
}
|
||||
return bArr;
|
||||
}
|
||||
if (b != 13) {
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
a aVar2 = new a();
|
||||
a(aVar2, this.a);
|
||||
if (aVar2.a != 0) {
|
||||
throw new g("type mismatch, tag: " + i + ", type: " + ((int) aVar.a) + ", " + ((int) aVar2.a));
|
||||
}
|
||||
int a3 = a(0, 0, true);
|
||||
if (a3 >= 0) {
|
||||
byte[] bArr2 = new byte[a3];
|
||||
this.a.get(bArr2);
|
||||
return bArr2;
|
||||
}
|
||||
throw new g("invalid size, tag: " + i + ", type: " + ((int) aVar.a) + ", " + ((int) aVar2.a) + ", size: " + a3);
|
||||
}
|
||||
|
||||
public i(byte[] bArr) {
|
||||
this.a = ByteBuffer.wrap(bArr);
|
||||
}
|
||||
|
||||
private static int a(a aVar, ByteBuffer byteBuffer) {
|
||||
byte b = byteBuffer.get();
|
||||
aVar.a = (byte) (b & 15);
|
||||
aVar.b = (b & 240) >> 4;
|
||||
if (aVar.b != 15) {
|
||||
return 1;
|
||||
}
|
||||
aVar.b = byteBuffer.get();
|
||||
return 2;
|
||||
}
|
||||
|
||||
public i(byte[] bArr, int i) {
|
||||
this.a = ByteBuffer.wrap(bArr);
|
||||
this.a.position(4);
|
||||
}
|
||||
|
||||
private boolean a(int i) {
|
||||
a aVar;
|
||||
try {
|
||||
aVar = new a();
|
||||
while (true) {
|
||||
int a2 = a(aVar, this.a.duplicate());
|
||||
if (i <= aVar.b || aVar.a == 11) {
|
||||
break;
|
||||
}
|
||||
this.a.position(this.a.position() + a2);
|
||||
a(aVar.a);
|
||||
}
|
||||
} catch (g | BufferUnderflowException unused) {
|
||||
}
|
||||
return i == aVar.b;
|
||||
}
|
||||
|
||||
private void a() {
|
||||
a aVar = new a();
|
||||
do {
|
||||
a(aVar, this.a);
|
||||
a(aVar.a);
|
||||
} while (aVar.a != 11);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private <T> T[] b(T t, int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
if (aVar.a == 9) {
|
||||
int a2 = a(0, 0, true);
|
||||
if (a2 >= 0) {
|
||||
T[] tArr = (T[]) ((Object[]) Array.newInstance(t.getClass(), a2));
|
||||
for (int i2 = 0; i2 < a2; i2++) {
|
||||
tArr[i2] = a((i) t, 0, true);
|
||||
}
|
||||
return tArr;
|
||||
}
|
||||
throw new g("size invalid: " + a2);
|
||||
}
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
|
||||
private void a(byte b) {
|
||||
int i = 0;
|
||||
switch (b) {
|
||||
case 0:
|
||||
ByteBuffer byteBuffer = this.a;
|
||||
byteBuffer.position(byteBuffer.position() + 1);
|
||||
return;
|
||||
case 1:
|
||||
ByteBuffer byteBuffer2 = this.a;
|
||||
byteBuffer2.position(byteBuffer2.position() + 2);
|
||||
return;
|
||||
case 2:
|
||||
ByteBuffer byteBuffer3 = this.a;
|
||||
byteBuffer3.position(byteBuffer3.position() + 4);
|
||||
return;
|
||||
case 3:
|
||||
ByteBuffer byteBuffer4 = this.a;
|
||||
byteBuffer4.position(byteBuffer4.position() + 8);
|
||||
return;
|
||||
case 4:
|
||||
ByteBuffer byteBuffer5 = this.a;
|
||||
byteBuffer5.position(byteBuffer5.position() + 4);
|
||||
return;
|
||||
case 5:
|
||||
ByteBuffer byteBuffer6 = this.a;
|
||||
byteBuffer6.position(byteBuffer6.position() + 8);
|
||||
return;
|
||||
case 6:
|
||||
int i2 = this.a.get();
|
||||
if (i2 < 0) {
|
||||
i2 += DataDecryptTool.DECRYPT_ALL_FILE;
|
||||
}
|
||||
ByteBuffer byteBuffer7 = this.a;
|
||||
byteBuffer7.position(byteBuffer7.position() + i2);
|
||||
return;
|
||||
case 7:
|
||||
int i3 = this.a.getInt();
|
||||
ByteBuffer byteBuffer8 = this.a;
|
||||
byteBuffer8.position(byteBuffer8.position() + i3);
|
||||
return;
|
||||
case 8:
|
||||
int a2 = a(0, 0, true);
|
||||
while (i < (a2 << 1)) {
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
a(aVar.a);
|
||||
i++;
|
||||
}
|
||||
return;
|
||||
case 9:
|
||||
int a3 = a(0, 0, true);
|
||||
while (i < a3) {
|
||||
a aVar2 = new a();
|
||||
a(aVar2, this.a);
|
||||
a(aVar2.a);
|
||||
i++;
|
||||
}
|
||||
return;
|
||||
case 10:
|
||||
a();
|
||||
return;
|
||||
case 11:
|
||||
case 12:
|
||||
return;
|
||||
case 13:
|
||||
a aVar3 = new a();
|
||||
a(aVar3, this.a);
|
||||
if (aVar3.a == 0) {
|
||||
int a4 = a(0, 0, true);
|
||||
ByteBuffer byteBuffer9 = this.a;
|
||||
byteBuffer9.position(byteBuffer9.position() + a4);
|
||||
return;
|
||||
} else {
|
||||
throw new g("skipField with invalid type, type value: " + ((int) b) + ", " + ((int) aVar3.a));
|
||||
}
|
||||
default:
|
||||
throw new g("invalid type.");
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean a(int i, boolean z) {
|
||||
return a((byte) 0, i, z) != 0;
|
||||
}
|
||||
|
||||
public final byte a(byte b, int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return b;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
byte b2 = aVar.a;
|
||||
if (b2 == 0) {
|
||||
return this.a.get();
|
||||
}
|
||||
if (b2 == 12) {
|
||||
return (byte) 0;
|
||||
}
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
|
||||
public final short a(short s, int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
byte b = aVar.a;
|
||||
if (b == 0) {
|
||||
return this.a.get();
|
||||
}
|
||||
if (b == 1) {
|
||||
return this.a.getShort();
|
||||
}
|
||||
if (b == 12) {
|
||||
return (short) 0;
|
||||
}
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
|
||||
public final int a(int i, int i2, boolean z) {
|
||||
if (!a(i2)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return i;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
byte b = aVar.a;
|
||||
if (b == 0) {
|
||||
return this.a.get();
|
||||
}
|
||||
if (b == 1) {
|
||||
return this.a.getShort();
|
||||
}
|
||||
if (b == 2) {
|
||||
return this.a.getInt();
|
||||
}
|
||||
if (b == 12) {
|
||||
return 0;
|
||||
}
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
|
||||
public final long a(long j, int i, boolean z) {
|
||||
int i2;
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return j;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
byte b = aVar.a;
|
||||
if (b == 0) {
|
||||
i2 = this.a.get();
|
||||
} else if (b == 1) {
|
||||
i2 = this.a.getShort();
|
||||
} else {
|
||||
if (b != 2) {
|
||||
if (b == 3) {
|
||||
return this.a.getLong();
|
||||
}
|
||||
if (b == 12) {
|
||||
return 0L;
|
||||
}
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
i2 = this.a.getInt();
|
||||
}
|
||||
return i2;
|
||||
}
|
||||
|
||||
private float a(float f, int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return f;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
byte b = aVar.a;
|
||||
if (b == 4) {
|
||||
return this.a.getFloat();
|
||||
}
|
||||
if (b == 12) {
|
||||
return 0.0f;
|
||||
}
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
|
||||
private double a(double d, int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return d;
|
||||
}
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
byte b = aVar.a;
|
||||
if (b == 4) {
|
||||
return this.a.getFloat();
|
||||
}
|
||||
if (b == 5) {
|
||||
return this.a.getDouble();
|
||||
}
|
||||
if (b == 12) {
|
||||
return 0.0d;
|
||||
}
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
|
||||
public final <K, V> HashMap<K, V> a(Map<K, V> map, int i, boolean z) {
|
||||
return (HashMap) a(new HashMap(), map, i, z);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private <K, V> Map<K, V> a(Map<K, V> map, Map<K, V> map2, int i, boolean z) {
|
||||
if (map2 != null && !map2.isEmpty()) {
|
||||
Map.Entry<K, V> next = map2.entrySet().iterator().next();
|
||||
K key = next.getKey();
|
||||
V value = next.getValue();
|
||||
if (a(i)) {
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
if (aVar.a == 8) {
|
||||
int a2 = a(0, 0, true);
|
||||
if (a2 < 0) {
|
||||
throw new g("size invalid: " + a2);
|
||||
}
|
||||
for (int i2 = 0; i2 < a2; i2++) {
|
||||
map.put(a((i) key, 0, true), a((i) value, 1, true));
|
||||
}
|
||||
} else {
|
||||
throw new g("type mismatch.");
|
||||
}
|
||||
} else if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
return new HashMap();
|
||||
}
|
||||
|
||||
private <T> T[] a(T[] tArr, int i, boolean z) {
|
||||
if (tArr != null && tArr.length != 0) {
|
||||
return (T[]) b(tArr[0], i, z);
|
||||
}
|
||||
throw new g("unable to get type of key and value.");
|
||||
}
|
||||
|
||||
public final k a(k kVar, int i, boolean z) {
|
||||
if (!a(i)) {
|
||||
if (z) {
|
||||
throw new g("require field not exist.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
k kVar2 = (k) kVar.getClass().newInstance();
|
||||
a aVar = new a();
|
||||
a(aVar, this.a);
|
||||
if (aVar.a == 10) {
|
||||
kVar2.a(this);
|
||||
a();
|
||||
return kVar2;
|
||||
}
|
||||
throw new g("type mismatch.");
|
||||
} catch (Exception e) {
|
||||
throw new g(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public final <T> Object a(T t, int i, boolean z) {
|
||||
if (t instanceof Byte) {
|
||||
return Byte.valueOf(a((byte) 0, i, z));
|
||||
}
|
||||
if (t instanceof Boolean) {
|
||||
return Boolean.valueOf(a((byte) 0, i, z) != 0);
|
||||
}
|
||||
if (t instanceof Short) {
|
||||
return Short.valueOf(a((short) 0, i, z));
|
||||
}
|
||||
if (t instanceof Integer) {
|
||||
return Integer.valueOf(a(0, i, z));
|
||||
}
|
||||
if (t instanceof Long) {
|
||||
return Long.valueOf(a(0L, i, z));
|
||||
}
|
||||
if (t instanceof Float) {
|
||||
return Float.valueOf(a(0.0f, i, z));
|
||||
}
|
||||
if (t instanceof Double) {
|
||||
return Double.valueOf(a(0.0d, i, z));
|
||||
}
|
||||
if (t instanceof String) {
|
||||
return String.valueOf(b(i, z));
|
||||
}
|
||||
if (t instanceof Map) {
|
||||
return (HashMap) a(new HashMap(), (Map) t, i, z);
|
||||
}
|
||||
if (t instanceof List) {
|
||||
List list = (List) t;
|
||||
if (list == null || list.isEmpty()) {
|
||||
return new ArrayList();
|
||||
}
|
||||
Object[] b = b(list.get(0), i, z);
|
||||
if (b == null) {
|
||||
return null;
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (Object obj : b) {
|
||||
arrayList.add(obj);
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
if (t instanceof k) {
|
||||
return a((k) t, i, z);
|
||||
}
|
||||
if (t.getClass().isArray()) {
|
||||
if (!(t instanceof byte[]) && !(t instanceof Byte[])) {
|
||||
if (t instanceof boolean[]) {
|
||||
return d(i, z);
|
||||
}
|
||||
if (t instanceof short[]) {
|
||||
return e(i, z);
|
||||
}
|
||||
if (t instanceof int[]) {
|
||||
return f(i, z);
|
||||
}
|
||||
if (t instanceof long[]) {
|
||||
return g(i, z);
|
||||
}
|
||||
if (t instanceof float[]) {
|
||||
return h(i, z);
|
||||
}
|
||||
if (t instanceof double[]) {
|
||||
return i(i, z);
|
||||
}
|
||||
return a((Object[]) t, i, z);
|
||||
}
|
||||
return c(i, z);
|
||||
}
|
||||
throw new g("read object error: unsupport type.");
|
||||
}
|
||||
|
||||
public final int a(String str) {
|
||||
this.b = str;
|
||||
return 0;
|
||||
}
|
||||
}
|
302
sources/com/tencent/bugly/proguard/j.java
Normal file
302
sources/com/tencent/bugly/proguard/j.java
Normal file
@@ -0,0 +1,302 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import com.ubtrobot.jimu.robotapi.PeripheralType;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class j {
|
||||
private ByteBuffer a;
|
||||
private String b;
|
||||
|
||||
public j(int i) {
|
||||
this.b = "GBK";
|
||||
this.a = ByteBuffer.allocate(i);
|
||||
}
|
||||
|
||||
public final ByteBuffer a() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
public final byte[] b() {
|
||||
byte[] bArr = new byte[this.a.position()];
|
||||
System.arraycopy(this.a.array(), 0, bArr, 0, this.a.position());
|
||||
return bArr;
|
||||
}
|
||||
|
||||
private void a(int i) {
|
||||
if (this.a.remaining() < i) {
|
||||
ByteBuffer allocate = ByteBuffer.allocate((this.a.capacity() + i) << 1);
|
||||
allocate.put(this.a.array(), 0, this.a.position());
|
||||
this.a = allocate;
|
||||
}
|
||||
}
|
||||
|
||||
private void b(byte b, int i) {
|
||||
if (i < 15) {
|
||||
this.a.put((byte) (b | (i << 4)));
|
||||
} else if (i < 256) {
|
||||
this.a.put((byte) (b | 240));
|
||||
this.a.put((byte) i);
|
||||
} else {
|
||||
throw new b("tag is too large: " + i);
|
||||
}
|
||||
}
|
||||
|
||||
public j() {
|
||||
this(PeripheralType.SERVO);
|
||||
}
|
||||
|
||||
public final void a(boolean z, int i) {
|
||||
a(z ? (byte) 1 : (byte) 0, i);
|
||||
}
|
||||
|
||||
public final void a(byte b, int i) {
|
||||
a(3);
|
||||
if (b == 0) {
|
||||
b((byte) 12, i);
|
||||
} else {
|
||||
b((byte) 0, i);
|
||||
this.a.put(b);
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(short s, int i) {
|
||||
a(4);
|
||||
if (s >= -128 && s <= 127) {
|
||||
a((byte) s, i);
|
||||
} else {
|
||||
b((byte) 1, i);
|
||||
this.a.putShort(s);
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(int i, int i2) {
|
||||
a(6);
|
||||
if (i >= -32768 && i <= 32767) {
|
||||
a((short) i, i2);
|
||||
} else {
|
||||
b((byte) 2, i2);
|
||||
this.a.putInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(long j, int i) {
|
||||
a(10);
|
||||
if (j >= -2147483648L && j <= 2147483647L) {
|
||||
a((int) j, i);
|
||||
} else {
|
||||
b((byte) 3, i);
|
||||
this.a.putLong(j);
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(String str, int i) {
|
||||
byte[] bytes;
|
||||
try {
|
||||
bytes = str.getBytes(this.b);
|
||||
} catch (UnsupportedEncodingException unused) {
|
||||
bytes = str.getBytes();
|
||||
}
|
||||
a(bytes.length + 10);
|
||||
if (bytes.length > 255) {
|
||||
b((byte) 7, i);
|
||||
this.a.putInt(bytes.length);
|
||||
this.a.put(bytes);
|
||||
} else {
|
||||
b((byte) 6, i);
|
||||
this.a.put((byte) bytes.length);
|
||||
this.a.put(bytes);
|
||||
}
|
||||
}
|
||||
|
||||
public final <K, V> void a(Map<K, V> map, int i) {
|
||||
a(8);
|
||||
b((byte) 8, i);
|
||||
a(map == null ? 0 : map.size(), 0);
|
||||
if (map != null) {
|
||||
for (Map.Entry<K, V> entry : map.entrySet()) {
|
||||
a(entry.getKey(), 0);
|
||||
a(entry.getValue(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(byte[] bArr, int i) {
|
||||
a(bArr.length + 8);
|
||||
b((byte) 13, i);
|
||||
b((byte) 0, 0);
|
||||
a(bArr.length, 0);
|
||||
this.a.put(bArr);
|
||||
}
|
||||
|
||||
public final <T> void a(Collection<T> collection, int i) {
|
||||
a(8);
|
||||
b((byte) 9, i);
|
||||
a(collection == null ? 0 : collection.size(), 0);
|
||||
if (collection != null) {
|
||||
Iterator<T> it = collection.iterator();
|
||||
while (it.hasNext()) {
|
||||
a(it.next(), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(k kVar, int i) {
|
||||
a(2);
|
||||
b((byte) 10, i);
|
||||
kVar.a(this);
|
||||
a(2);
|
||||
b((byte) 11, 0);
|
||||
}
|
||||
|
||||
public final void a(Object obj, int i) {
|
||||
if (obj instanceof Byte) {
|
||||
a(((Byte) obj).byteValue(), i);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof Boolean) {
|
||||
a(((Boolean) obj).booleanValue() ? (byte) 1 : (byte) 0, i);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof Short) {
|
||||
a(((Short) obj).shortValue(), i);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof Integer) {
|
||||
a(((Integer) obj).intValue(), i);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof Long) {
|
||||
a(((Long) obj).longValue(), i);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof Float) {
|
||||
float floatValue = ((Float) obj).floatValue();
|
||||
a(6);
|
||||
b((byte) 4, i);
|
||||
this.a.putFloat(floatValue);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof Double) {
|
||||
double doubleValue = ((Double) obj).doubleValue();
|
||||
a(10);
|
||||
b((byte) 5, i);
|
||||
this.a.putDouble(doubleValue);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof String) {
|
||||
a((String) obj, i);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof Map) {
|
||||
a((Map) obj, i);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof List) {
|
||||
a((Collection) obj, i);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof k) {
|
||||
a(2);
|
||||
b((byte) 10, i);
|
||||
((k) obj).a(this);
|
||||
a(2);
|
||||
b((byte) 11, 0);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof byte[]) {
|
||||
a((byte[]) obj, i);
|
||||
return;
|
||||
}
|
||||
if (obj instanceof boolean[]) {
|
||||
boolean[] zArr = (boolean[]) obj;
|
||||
a(8);
|
||||
b((byte) 9, i);
|
||||
a(zArr.length, 0);
|
||||
for (boolean z : zArr) {
|
||||
a(z ? (byte) 1 : (byte) 0, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (obj instanceof short[]) {
|
||||
short[] sArr = (short[]) obj;
|
||||
a(8);
|
||||
b((byte) 9, i);
|
||||
a(sArr.length, 0);
|
||||
for (short s : sArr) {
|
||||
a(s, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (obj instanceof int[]) {
|
||||
int[] iArr = (int[]) obj;
|
||||
a(8);
|
||||
b((byte) 9, i);
|
||||
a(iArr.length, 0);
|
||||
for (int i2 : iArr) {
|
||||
a(i2, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (obj instanceof long[]) {
|
||||
long[] jArr = (long[]) obj;
|
||||
a(8);
|
||||
b((byte) 9, i);
|
||||
a(jArr.length, 0);
|
||||
for (long j : jArr) {
|
||||
a(j, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (obj instanceof float[]) {
|
||||
float[] fArr = (float[]) obj;
|
||||
a(8);
|
||||
b((byte) 9, i);
|
||||
a(fArr.length, 0);
|
||||
for (float f : fArr) {
|
||||
a(6);
|
||||
b((byte) 4, 0);
|
||||
this.a.putFloat(f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (obj instanceof double[]) {
|
||||
double[] dArr = (double[]) obj;
|
||||
a(8);
|
||||
b((byte) 9, i);
|
||||
a(dArr.length, 0);
|
||||
for (double d : dArr) {
|
||||
a(10);
|
||||
b((byte) 5, 0);
|
||||
this.a.putDouble(d);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (obj.getClass().isArray()) {
|
||||
Object[] objArr = (Object[]) obj;
|
||||
a(8);
|
||||
b((byte) 9, i);
|
||||
a(objArr.length, 0);
|
||||
for (Object obj2 : objArr) {
|
||||
a(obj2, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (obj instanceof Collection) {
|
||||
a((Collection) obj, i);
|
||||
} else {
|
||||
throw new b("write object error: unsupport type. " + obj.getClass());
|
||||
}
|
||||
}
|
||||
|
||||
public final int a(String str) {
|
||||
this.b = str;
|
||||
return 0;
|
||||
}
|
||||
}
|
19
sources/com/tencent/bugly/proguard/k.java
Normal file
19
sources/com/tencent/bugly/proguard/k.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class k implements Serializable {
|
||||
public abstract void a(i iVar);
|
||||
|
||||
public abstract void a(j jVar);
|
||||
|
||||
public abstract void a(StringBuilder sb, int i);
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
a(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
40
sources/com/tencent/bugly/proguard/l.java
Normal file
40
sources/com/tencent/bugly/proguard/l.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import com.ijm.dataencryption.de.DataDecryptTool;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class l {
|
||||
static {
|
||||
byte[] bArr = {48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70};
|
||||
byte[] bArr2 = new byte[DataDecryptTool.DECRYPT_ALL_FILE];
|
||||
byte[] bArr3 = new byte[DataDecryptTool.DECRYPT_ALL_FILE];
|
||||
for (int i = 0; i < 256; i++) {
|
||||
bArr2[i] = bArr[i >>> 4];
|
||||
bArr3[i] = bArr[i & 15];
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean a(int i, int i2) {
|
||||
return i == i2;
|
||||
}
|
||||
|
||||
public static boolean a(long j, long j2) {
|
||||
return j == j2;
|
||||
}
|
||||
|
||||
public static boolean a(Object obj, Object obj2) {
|
||||
return obj.equals(obj2);
|
||||
}
|
||||
|
||||
public static boolean a(boolean z, boolean z2) {
|
||||
return z == z2;
|
||||
}
|
||||
|
||||
public static byte[] a(ByteBuffer byteBuffer) {
|
||||
byte[] bArr = new byte[byteBuffer.position()];
|
||||
System.arraycopy(byteBuffer.array(), 0, bArr, 0, bArr.length);
|
||||
return bArr;
|
||||
}
|
||||
}
|
20
sources/com/tencent/bugly/proguard/m.java
Normal file
20
sources/com/tencent/bugly/proguard/m.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class m implements Serializable, Comparable<m> {
|
||||
public long a;
|
||||
public String b;
|
||||
public long c;
|
||||
public int d;
|
||||
public String e;
|
||||
public String f;
|
||||
public long g;
|
||||
|
||||
@Override // java.lang.Comparable
|
||||
public final /* bridge */ /* synthetic */ int compareTo(m mVar) {
|
||||
return (int) (this.c - mVar.c);
|
||||
}
|
||||
}
|
301
sources/com/tencent/bugly/proguard/n.java
Normal file
301
sources/com/tencent/bugly/proguard/n.java
Normal file
@@ -0,0 +1,301 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.text.TextUtils;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class n {
|
||||
public static final long a = System.currentTimeMillis();
|
||||
private static n b;
|
||||
private Context c;
|
||||
private SharedPreferences f;
|
||||
private Map<Integer, Map<String, m>> e = new HashMap();
|
||||
private String d = com.tencent.bugly.crashreport.common.info.a.b().d;
|
||||
|
||||
private n(Context context) {
|
||||
this.c = context;
|
||||
this.f = context.getSharedPreferences("crashrecord", 0);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Code restructure failed: missing block: B:21:0x0052, code lost:
|
||||
|
||||
if (r6 == null) goto L31;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:24:0x0046, code lost:
|
||||
|
||||
r6.close();
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:27:0x0044, code lost:
|
||||
|
||||
if (r6 == null) goto L31;
|
||||
*/
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Type inference failed for: r6v4, types: [boolean] */
|
||||
/* JADX WARN: Type inference failed for: r6v5, types: [java.io.ObjectInputStream] */
|
||||
/* JADX WARN: Type inference failed for: r6v6 */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public synchronized <T extends java.util.List<?>> T c(int r6) {
|
||||
/*
|
||||
r5 = this;
|
||||
monitor-enter(r5)
|
||||
r0 = 0
|
||||
r1 = 0
|
||||
java.io.File r2 = new java.io.File // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
android.content.Context r3 = r5.c // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
java.lang.String r4 = "crashrecord"
|
||||
java.io.File r3 = r3.getDir(r4, r1) // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
r4.<init>() // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
r4.append(r6) // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
java.lang.String r6 = r4.toString() // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
r2.<init>(r3, r6) // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
boolean r6 = r2.exists() // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
if (r6 != 0) goto L24
|
||||
monitor-exit(r5)
|
||||
return r0
|
||||
L24:
|
||||
java.io.ObjectInputStream r6 = new java.io.ObjectInputStream // Catch: java.lang.Throwable -> L39 java.lang.ClassNotFoundException -> L3c java.io.IOException -> L4a
|
||||
java.io.FileInputStream r3 = new java.io.FileInputStream // Catch: java.lang.Throwable -> L39 java.lang.ClassNotFoundException -> L3c java.io.IOException -> L4a
|
||||
r3.<init>(r2) // Catch: java.lang.Throwable -> L39 java.lang.ClassNotFoundException -> L3c java.io.IOException -> L4a
|
||||
r6.<init>(r3) // Catch: java.lang.Throwable -> L39 java.lang.ClassNotFoundException -> L3c java.io.IOException -> L4a
|
||||
java.lang.Object r2 = r6.readObject() // Catch: java.lang.ClassNotFoundException -> L3d java.io.IOException -> L4b java.lang.Throwable -> L55
|
||||
java.util.List r2 = (java.util.List) r2 // Catch: java.lang.ClassNotFoundException -> L3d java.io.IOException -> L4b java.lang.Throwable -> L55
|
||||
r6.close() // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
monitor-exit(r5)
|
||||
return r2
|
||||
L39:
|
||||
r2 = move-exception
|
||||
r6 = r0
|
||||
goto L56
|
||||
L3c:
|
||||
r6 = r0
|
||||
L3d:
|
||||
java.lang.String r2 = "get object error"
|
||||
java.lang.Object[] r3 = new java.lang.Object[r1] // Catch: java.lang.Throwable -> L55
|
||||
com.tencent.bugly.proguard.x.a(r2, r3) // Catch: java.lang.Throwable -> L55
|
||||
if (r6 == 0) goto L65
|
||||
L46:
|
||||
r6.close() // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
goto L65
|
||||
L4a:
|
||||
r6 = r0
|
||||
L4b:
|
||||
java.lang.String r2 = "open record file error"
|
||||
java.lang.Object[] r3 = new java.lang.Object[r1] // Catch: java.lang.Throwable -> L55
|
||||
com.tencent.bugly.proguard.x.a(r2, r3) // Catch: java.lang.Throwable -> L55
|
||||
if (r6 == 0) goto L65
|
||||
goto L46
|
||||
L55:
|
||||
r2 = move-exception
|
||||
L56:
|
||||
if (r6 == 0) goto L5b
|
||||
r6.close() // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
L5b:
|
||||
throw r2 // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L5e
|
||||
L5c:
|
||||
r6 = move-exception
|
||||
goto L67
|
||||
L5e:
|
||||
java.lang.String r6 = "readCrashRecord error"
|
||||
java.lang.Object[] r1 = new java.lang.Object[r1] // Catch: java.lang.Throwable -> L5c
|
||||
com.tencent.bugly.proguard.x.e(r6, r1) // Catch: java.lang.Throwable -> L5c
|
||||
L65:
|
||||
monitor-exit(r5)
|
||||
return r0
|
||||
L67:
|
||||
monitor-exit(r5)
|
||||
throw r6
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.n.c(int):java.util.List");
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public synchronized boolean b(int i) {
|
||||
try {
|
||||
List<m> c = c(i);
|
||||
if (c == null) {
|
||||
return false;
|
||||
}
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
ArrayList arrayList = new ArrayList();
|
||||
ArrayList arrayList2 = new ArrayList();
|
||||
for (m mVar : c) {
|
||||
if (mVar.b != null && mVar.b.equalsIgnoreCase(this.d) && mVar.d > 0) {
|
||||
arrayList.add(mVar);
|
||||
}
|
||||
if (mVar.c + 86400000 < currentTimeMillis) {
|
||||
arrayList2.add(mVar);
|
||||
}
|
||||
}
|
||||
Collections.sort(arrayList);
|
||||
if (arrayList.size() >= 2) {
|
||||
if (arrayList.size() <= 0 || ((m) arrayList.get(arrayList.size() - 1)).c + 86400000 >= currentTimeMillis) {
|
||||
return true;
|
||||
}
|
||||
c.clear();
|
||||
a(i, (int) c);
|
||||
return false;
|
||||
}
|
||||
c.removeAll(arrayList2);
|
||||
a(i, (int) c);
|
||||
return false;
|
||||
} catch (Exception unused) {
|
||||
x.e("isFrequentCrash failed", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static synchronized n a(Context context) {
|
||||
n nVar;
|
||||
synchronized (n.class) {
|
||||
if (b == null) {
|
||||
b = new n(context);
|
||||
}
|
||||
nVar = b;
|
||||
}
|
||||
return nVar;
|
||||
}
|
||||
|
||||
public static synchronized n a() {
|
||||
n nVar;
|
||||
synchronized (n.class) {
|
||||
nVar = b;
|
||||
}
|
||||
return nVar;
|
||||
}
|
||||
|
||||
public final void a(int i, final int i2) {
|
||||
final int i3 = 1004;
|
||||
w.a().a(new Runnable() { // from class: com.tencent.bugly.proguard.n.1
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
m mVar;
|
||||
try {
|
||||
if (TextUtils.isEmpty(n.this.d)) {
|
||||
return;
|
||||
}
|
||||
List<m> c = n.this.c(i3);
|
||||
if (c == null) {
|
||||
c = new ArrayList();
|
||||
}
|
||||
if (n.this.e.get(Integer.valueOf(i3)) == null) {
|
||||
n.this.e.put(Integer.valueOf(i3), new HashMap());
|
||||
}
|
||||
if (((Map) n.this.e.get(Integer.valueOf(i3))).get(n.this.d) == null) {
|
||||
mVar = new m();
|
||||
mVar.a = i3;
|
||||
mVar.g = n.a;
|
||||
mVar.b = n.this.d;
|
||||
mVar.f = com.tencent.bugly.crashreport.common.info.a.b().j;
|
||||
com.tencent.bugly.crashreport.common.info.a.b().getClass();
|
||||
mVar.e = "3.1.0";
|
||||
mVar.c = System.currentTimeMillis();
|
||||
mVar.d = i2;
|
||||
((Map) n.this.e.get(Integer.valueOf(i3))).put(n.this.d, mVar);
|
||||
} else {
|
||||
mVar = (m) ((Map) n.this.e.get(Integer.valueOf(i3))).get(n.this.d);
|
||||
mVar.d = i2;
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
boolean z = false;
|
||||
for (m mVar2 : c) {
|
||||
if (mVar2.g == mVar.g && mVar2.b != null && mVar2.b.equalsIgnoreCase(mVar.b)) {
|
||||
z = true;
|
||||
mVar2.d = mVar.d;
|
||||
}
|
||||
if ((mVar2.e != null && !mVar2.e.equalsIgnoreCase(mVar.e)) || ((mVar2.f != null && !mVar2.f.equalsIgnoreCase(mVar.f)) || mVar2.d <= 0)) {
|
||||
arrayList.add(mVar2);
|
||||
}
|
||||
}
|
||||
c.removeAll(arrayList);
|
||||
if (!z) {
|
||||
c.add(mVar);
|
||||
}
|
||||
n.this.a(i3, (int) c);
|
||||
} catch (Exception unused) {
|
||||
x.e("saveCrashRecord failed", new Object[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public synchronized <T extends List<?>> void a(int i, T t) {
|
||||
File dir;
|
||||
StringBuilder sb;
|
||||
ObjectOutputStream objectOutputStream;
|
||||
if (t == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
dir = this.c.getDir("crashrecord", 0);
|
||||
sb = new StringBuilder();
|
||||
sb.append(i);
|
||||
objectOutputStream = null;
|
||||
} catch (Exception unused) {
|
||||
x.e("writeCrashRecord error", new Object[0]);
|
||||
}
|
||||
try {
|
||||
try {
|
||||
ObjectOutputStream objectOutputStream2 = new ObjectOutputStream(new FileOutputStream(new File(dir, sb.toString())));
|
||||
try {
|
||||
objectOutputStream2.writeObject(t);
|
||||
objectOutputStream2.close();
|
||||
} catch (IOException e) {
|
||||
e = e;
|
||||
objectOutputStream = objectOutputStream2;
|
||||
e.printStackTrace();
|
||||
x.a("open record file error", new Object[0]);
|
||||
if (objectOutputStream != null) {
|
||||
objectOutputStream.close();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
th = th;
|
||||
objectOutputStream = objectOutputStream2;
|
||||
if (objectOutputStream != null) {
|
||||
objectOutputStream.close();
|
||||
}
|
||||
throw th;
|
||||
}
|
||||
} catch (IOException e2) {
|
||||
e = e2;
|
||||
}
|
||||
} catch (Throwable th2) {
|
||||
th = th2;
|
||||
}
|
||||
}
|
||||
|
||||
public final synchronized boolean a(final int i) {
|
||||
boolean z;
|
||||
z = true;
|
||||
try {
|
||||
z = this.f.getBoolean(i + "_" + this.d, true);
|
||||
w.a().a(new Runnable() { // from class: com.tencent.bugly.proguard.n.2
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
boolean b2 = n.this.b(i);
|
||||
n.this.f.edit().putBoolean(i + "_" + n.this.d, !b2).commit();
|
||||
}
|
||||
});
|
||||
} catch (Exception unused) {
|
||||
x.e("canInit error", new Object[0]);
|
||||
return z;
|
||||
}
|
||||
return z;
|
||||
}
|
||||
}
|
11
sources/com/tencent/bugly/proguard/o.java
Normal file
11
sources/com/tencent/bugly/proguard/o.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public interface o {
|
||||
byte[] a();
|
||||
|
||||
String b();
|
||||
|
||||
boolean c();
|
||||
}
|
811
sources/com/tencent/bugly/proguard/p.java
Normal file
811
sources/com/tencent/bugly/proguard/p.java
Normal file
@@ -0,0 +1,811 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import com.liulishuo.filedownloader.model.FileDownloadModel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class p {
|
||||
private static p a = null;
|
||||
private static q b = null;
|
||||
private static boolean c = false;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
class a extends Thread {
|
||||
private int a;
|
||||
private o b;
|
||||
private String c;
|
||||
private ContentValues d;
|
||||
private boolean e;
|
||||
private String[] f;
|
||||
private String g;
|
||||
private String[] h;
|
||||
private String i;
|
||||
private String j;
|
||||
private String k;
|
||||
private String l;
|
||||
private String m;
|
||||
private String[] n;
|
||||
private int o;
|
||||
private String p;
|
||||
private byte[] q;
|
||||
|
||||
public a(int i, o oVar) {
|
||||
this.a = i;
|
||||
this.b = oVar;
|
||||
}
|
||||
|
||||
public final void a(int i, String str, byte[] bArr) {
|
||||
this.o = i;
|
||||
this.p = str;
|
||||
this.q = bArr;
|
||||
}
|
||||
|
||||
@Override // java.lang.Thread, java.lang.Runnable
|
||||
public final void run() {
|
||||
switch (this.a) {
|
||||
case 1:
|
||||
p.this.a(this.c, this.d, this.b);
|
||||
break;
|
||||
case 2:
|
||||
p.this.a(this.c, this.m, this.n, this.b);
|
||||
break;
|
||||
case 3:
|
||||
Cursor a = p.this.a(this.e, this.c, this.f, this.g, this.h, this.i, this.j, this.k, this.l, this.b);
|
||||
if (a != null) {
|
||||
a.close();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
p.this.a(this.o, this.p, this.q, this.b);
|
||||
break;
|
||||
case 5:
|
||||
p.this.a(this.o, this.b);
|
||||
break;
|
||||
case 6:
|
||||
p.this.a(this.o, this.p, this.b);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private p(Context context, List<com.tencent.bugly.a> list) {
|
||||
b = new q(context, list);
|
||||
}
|
||||
|
||||
private synchronized boolean b(r rVar) {
|
||||
ContentValues d;
|
||||
if (rVar == null) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
SQLiteDatabase writableDatabase = b.getWritableDatabase();
|
||||
if (writableDatabase == null || (d = d(rVar)) == null) {
|
||||
return false;
|
||||
}
|
||||
long replace = writableDatabase.replace("t_pf", FileDownloadModel.ID, d);
|
||||
if (replace < 0) {
|
||||
return false;
|
||||
}
|
||||
x.c("[Database] insert %s success.", "t_pf");
|
||||
rVar.a = replace;
|
||||
return true;
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
if (!x.a(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static ContentValues c(r rVar) {
|
||||
if (rVar == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
ContentValues contentValues = new ContentValues();
|
||||
if (rVar.a > 0) {
|
||||
contentValues.put(FileDownloadModel.ID, Long.valueOf(rVar.a));
|
||||
}
|
||||
contentValues.put("_tp", Integer.valueOf(rVar.b));
|
||||
contentValues.put("_pc", rVar.c);
|
||||
contentValues.put("_th", rVar.d);
|
||||
contentValues.put("_tm", Long.valueOf(rVar.e));
|
||||
if (rVar.g != null) {
|
||||
contentValues.put("_dt", rVar.g);
|
||||
}
|
||||
return contentValues;
|
||||
} catch (Throwable th) {
|
||||
if (!x.a(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static ContentValues d(r rVar) {
|
||||
if (rVar != null && !z.a(rVar.f)) {
|
||||
try {
|
||||
ContentValues contentValues = new ContentValues();
|
||||
if (rVar.a > 0) {
|
||||
contentValues.put(FileDownloadModel.ID, Long.valueOf(rVar.a));
|
||||
}
|
||||
contentValues.put("_tp", rVar.f);
|
||||
contentValues.put("_tm", Long.valueOf(rVar.e));
|
||||
if (rVar.g != null) {
|
||||
contentValues.put("_dt", rVar.g);
|
||||
}
|
||||
return contentValues;
|
||||
} catch (Throwable th) {
|
||||
if (!x.a(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static synchronized p a(Context context, List<com.tencent.bugly.a> list) {
|
||||
p pVar;
|
||||
synchronized (p.class) {
|
||||
if (a == null) {
|
||||
a = new p(context, list);
|
||||
}
|
||||
pVar = a;
|
||||
}
|
||||
return pVar;
|
||||
}
|
||||
|
||||
public static synchronized p a() {
|
||||
p pVar;
|
||||
synchronized (p.class) {
|
||||
pVar = a;
|
||||
}
|
||||
return pVar;
|
||||
}
|
||||
|
||||
public final long a(String str, ContentValues contentValues, o oVar, boolean z) {
|
||||
return a(str, contentValues, (o) null);
|
||||
}
|
||||
|
||||
private synchronized List<r> c(int i) {
|
||||
Cursor cursor;
|
||||
try {
|
||||
SQLiteDatabase writableDatabase = b.getWritableDatabase();
|
||||
if (writableDatabase != null) {
|
||||
String str = "_id = " + i;
|
||||
cursor = writableDatabase.query("t_pf", null, str, null, null, null, null);
|
||||
if (cursor == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
ArrayList arrayList = new ArrayList();
|
||||
while (cursor.moveToNext()) {
|
||||
r b2 = b(cursor);
|
||||
if (b2 != null) {
|
||||
arrayList.add(b2);
|
||||
} else {
|
||||
try {
|
||||
String string = cursor.getString(cursor.getColumnIndex("_tp"));
|
||||
sb.append(" or _tp");
|
||||
sb.append(" = ");
|
||||
sb.append(string);
|
||||
} catch (Throwable unused) {
|
||||
x.d("[Database] unknown id.", new Object[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sb.length() > 0) {
|
||||
sb.append(" and _id");
|
||||
sb.append(" = ");
|
||||
sb.append(i);
|
||||
x.d("[Database] deleted %s illegal data %d.", "t_pf", Integer.valueOf(writableDatabase.delete("t_pf", str.substring(4), null)));
|
||||
}
|
||||
if (cursor != null) {
|
||||
cursor.close();
|
||||
}
|
||||
return arrayList;
|
||||
} catch (Throwable th) {
|
||||
th = th;
|
||||
try {
|
||||
if (!x.a(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
if (cursor != null) {
|
||||
cursor.close();
|
||||
}
|
||||
return null;
|
||||
} finally {
|
||||
if (cursor != null) {
|
||||
cursor.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable th2) {
|
||||
th = th2;
|
||||
cursor = null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Cursor a(String str, String[] strArr, String str2, String[] strArr2, o oVar, boolean z) {
|
||||
return a(false, str, strArr, str2, null, null, null, null, null, null);
|
||||
}
|
||||
|
||||
public final int a(String str, String str2, String[] strArr, o oVar, boolean z) {
|
||||
return a(str, str2, (String[]) null, (o) null);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Code restructure failed: missing block: B:25:0x003f, code lost:
|
||||
|
||||
if (r9 != null) goto L13;
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public synchronized long a(java.lang.String r7, android.content.ContentValues r8, com.tencent.bugly.proguard.o r9) {
|
||||
/*
|
||||
r6 = this;
|
||||
monitor-enter(r6)
|
||||
r0 = 0
|
||||
com.tencent.bugly.proguard.q r2 = com.tencent.bugly.proguard.p.b // Catch: java.lang.Throwable -> L35
|
||||
android.database.sqlite.SQLiteDatabase r2 = r2.getWritableDatabase() // Catch: java.lang.Throwable -> L35
|
||||
if (r2 == 0) goto L2d
|
||||
if (r8 == 0) goto L2d
|
||||
java.lang.String r3 = "_id"
|
||||
long r2 = r2.replace(r7, r3, r8) // Catch: java.lang.Throwable -> L35
|
||||
r8 = 0
|
||||
r4 = 1
|
||||
int r5 = (r2 > r0 ? 1 : (r2 == r0 ? 0 : -1))
|
||||
if (r5 < 0) goto L23
|
||||
java.lang.String r5 = "[Database] insert %s success."
|
||||
java.lang.Object[] r4 = new java.lang.Object[r4] // Catch: java.lang.Throwable -> L35
|
||||
r4[r8] = r7 // Catch: java.lang.Throwable -> L35
|
||||
com.tencent.bugly.proguard.x.c(r5, r4) // Catch: java.lang.Throwable -> L35
|
||||
goto L2c
|
||||
L23:
|
||||
java.lang.String r5 = "[Database] replace %s error."
|
||||
java.lang.Object[] r4 = new java.lang.Object[r4] // Catch: java.lang.Throwable -> L35
|
||||
r4[r8] = r7 // Catch: java.lang.Throwable -> L35
|
||||
com.tencent.bugly.proguard.x.d(r5, r4) // Catch: java.lang.Throwable -> L35
|
||||
L2c:
|
||||
r0 = r2
|
||||
L2d:
|
||||
if (r9 == 0) goto L42
|
||||
L2f:
|
||||
java.lang.Long.valueOf(r0) // Catch: java.lang.Throwable -> L33
|
||||
goto L42
|
||||
L33:
|
||||
r7 = move-exception
|
||||
goto L4b
|
||||
L35:
|
||||
r7 = move-exception
|
||||
boolean r8 = com.tencent.bugly.proguard.x.a(r7) // Catch: java.lang.Throwable -> L44
|
||||
if (r8 != 0) goto L3f
|
||||
r7.printStackTrace() // Catch: java.lang.Throwable -> L44
|
||||
L3f:
|
||||
if (r9 == 0) goto L42
|
||||
goto L2f
|
||||
L42:
|
||||
monitor-exit(r6)
|
||||
return r0
|
||||
L44:
|
||||
r7 = move-exception
|
||||
if (r9 == 0) goto L4a
|
||||
java.lang.Long.valueOf(r0) // Catch: java.lang.Throwable -> L33
|
||||
L4a:
|
||||
throw r7 // Catch: java.lang.Throwable -> L33
|
||||
L4b:
|
||||
monitor-exit(r6)
|
||||
throw r7
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.p.a(java.lang.String, android.content.ContentValues, com.tencent.bugly.proguard.o):long");
|
||||
}
|
||||
|
||||
public final synchronized void b(int i) {
|
||||
String str;
|
||||
SQLiteDatabase writableDatabase = b.getWritableDatabase();
|
||||
if (writableDatabase != null) {
|
||||
if (i >= 0) {
|
||||
try {
|
||||
str = "_tp = " + i;
|
||||
} catch (Throwable th) {
|
||||
if (x.a(th)) {
|
||||
return;
|
||||
}
|
||||
th.printStackTrace();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
str = null;
|
||||
}
|
||||
x.c("[Database] deleted %s data %d", "t_lr", Integer.valueOf(writableDatabase.delete("t_lr", str, null)));
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public synchronized Cursor a(boolean z, String str, String[] strArr, String str2, String[] strArr2, String str3, String str4, String str5, String str6, o oVar) {
|
||||
Cursor cursor;
|
||||
cursor = null;
|
||||
try {
|
||||
SQLiteDatabase writableDatabase = b.getWritableDatabase();
|
||||
if (writableDatabase != null) {
|
||||
cursor = writableDatabase.query(z, str, strArr, str2, strArr2, str3, str4, str5, str6);
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
return cursor;
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
return cursor;
|
||||
}
|
||||
|
||||
private static r b(Cursor cursor) {
|
||||
if (cursor == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
r rVar = new r();
|
||||
rVar.a = cursor.getLong(cursor.getColumnIndex(FileDownloadModel.ID));
|
||||
rVar.e = cursor.getLong(cursor.getColumnIndex("_tm"));
|
||||
rVar.f = cursor.getString(cursor.getColumnIndex("_tp"));
|
||||
rVar.g = cursor.getBlob(cursor.getColumnIndex("_dt"));
|
||||
return rVar;
|
||||
} catch (Throwable th) {
|
||||
if (!x.a(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Code restructure failed: missing block: B:21:0x0020, code lost:
|
||||
|
||||
if (r6 != null) goto L8;
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public synchronized int a(java.lang.String r3, java.lang.String r4, java.lang.String[] r5, com.tencent.bugly.proguard.o r6) {
|
||||
/*
|
||||
r2 = this;
|
||||
monitor-enter(r2)
|
||||
r0 = 0
|
||||
com.tencent.bugly.proguard.q r1 = com.tencent.bugly.proguard.p.b // Catch: java.lang.Throwable -> L16
|
||||
android.database.sqlite.SQLiteDatabase r1 = r1.getWritableDatabase() // Catch: java.lang.Throwable -> L16
|
||||
if (r1 == 0) goto Le
|
||||
int r0 = r1.delete(r3, r4, r5) // Catch: java.lang.Throwable -> L16
|
||||
Le:
|
||||
if (r6 == 0) goto L23
|
||||
L10:
|
||||
java.lang.Integer.valueOf(r0) // Catch: java.lang.Throwable -> L14
|
||||
goto L23
|
||||
L14:
|
||||
r3 = move-exception
|
||||
goto L2c
|
||||
L16:
|
||||
r3 = move-exception
|
||||
boolean r4 = com.tencent.bugly.proguard.x.a(r3) // Catch: java.lang.Throwable -> L25
|
||||
if (r4 != 0) goto L20
|
||||
r3.printStackTrace() // Catch: java.lang.Throwable -> L25
|
||||
L20:
|
||||
if (r6 == 0) goto L23
|
||||
goto L10
|
||||
L23:
|
||||
monitor-exit(r2)
|
||||
return r0
|
||||
L25:
|
||||
r3 = move-exception
|
||||
if (r6 == 0) goto L2b
|
||||
java.lang.Integer.valueOf(r0) // Catch: java.lang.Throwable -> L14
|
||||
L2b:
|
||||
throw r3 // Catch: java.lang.Throwable -> L14
|
||||
L2c:
|
||||
monitor-exit(r2)
|
||||
throw r3
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.p.a(java.lang.String, java.lang.String, java.lang.String[], com.tencent.bugly.proguard.o):int");
|
||||
}
|
||||
|
||||
public final boolean a(int i, String str, byte[] bArr, o oVar, boolean z) {
|
||||
if (!z) {
|
||||
a aVar = new a(4, null);
|
||||
aVar.a(i, str, bArr);
|
||||
w.a().a(aVar);
|
||||
return true;
|
||||
}
|
||||
return a(i, str, bArr, (o) null);
|
||||
}
|
||||
|
||||
public final Map<String, byte[]> a(int i, o oVar, boolean z) {
|
||||
return a(i, (o) null);
|
||||
}
|
||||
|
||||
public final boolean a(int i, String str, o oVar, boolean z) {
|
||||
return a(555, str, (o) null);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Code restructure failed: missing block: B:15:0x0027, code lost:
|
||||
|
||||
if (r8 != null) goto L5;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:6:0x002a, code lost:
|
||||
|
||||
return r0;
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public boolean a(int r5, java.lang.String r6, byte[] r7, com.tencent.bugly.proguard.o r8) {
|
||||
/*
|
||||
r4 = this;
|
||||
r0 = 0
|
||||
com.tencent.bugly.proguard.r r1 = new com.tencent.bugly.proguard.r // Catch: java.lang.Throwable -> L1d
|
||||
r1.<init>() // Catch: java.lang.Throwable -> L1d
|
||||
long r2 = (long) r5 // Catch: java.lang.Throwable -> L1d
|
||||
r1.a = r2 // Catch: java.lang.Throwable -> L1d
|
||||
r1.f = r6 // Catch: java.lang.Throwable -> L1d
|
||||
long r5 = java.lang.System.currentTimeMillis() // Catch: java.lang.Throwable -> L1d
|
||||
r1.e = r5 // Catch: java.lang.Throwable -> L1d
|
||||
r1.g = r7 // Catch: java.lang.Throwable -> L1d
|
||||
boolean r0 = r4.b(r1) // Catch: java.lang.Throwable -> L1d
|
||||
if (r8 == 0) goto L2a
|
||||
L19:
|
||||
java.lang.Boolean.valueOf(r0)
|
||||
goto L2a
|
||||
L1d:
|
||||
r5 = move-exception
|
||||
boolean r6 = com.tencent.bugly.proguard.x.a(r5) // Catch: java.lang.Throwable -> L2b
|
||||
if (r6 != 0) goto L27
|
||||
r5.printStackTrace() // Catch: java.lang.Throwable -> L2b
|
||||
L27:
|
||||
if (r8 == 0) goto L2a
|
||||
goto L19
|
||||
L2a:
|
||||
return r0
|
||||
L2b:
|
||||
r5 = move-exception
|
||||
if (r8 == 0) goto L31
|
||||
java.lang.Boolean.valueOf(r0)
|
||||
L31:
|
||||
throw r5
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.p.a(int, java.lang.String, byte[], com.tencent.bugly.proguard.o):boolean");
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public Map<String, byte[]> a(int i, o oVar) {
|
||||
HashMap hashMap = null;
|
||||
try {
|
||||
List<r> c2 = c(i);
|
||||
if (c2 == null) {
|
||||
return null;
|
||||
}
|
||||
HashMap hashMap2 = new HashMap();
|
||||
try {
|
||||
for (r rVar : c2) {
|
||||
byte[] bArr = rVar.g;
|
||||
if (bArr != null) {
|
||||
hashMap2.put(rVar.f, bArr);
|
||||
}
|
||||
}
|
||||
return hashMap2;
|
||||
} catch (Throwable th) {
|
||||
th = th;
|
||||
hashMap = hashMap2;
|
||||
if (x.a(th)) {
|
||||
return hashMap;
|
||||
}
|
||||
th.printStackTrace();
|
||||
return hashMap;
|
||||
}
|
||||
} catch (Throwable th2) {
|
||||
th = th2;
|
||||
}
|
||||
}
|
||||
|
||||
public final synchronized boolean a(r rVar) {
|
||||
ContentValues c2;
|
||||
if (rVar == null) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
SQLiteDatabase writableDatabase = b.getWritableDatabase();
|
||||
if (writableDatabase == null || (c2 = c(rVar)) == null) {
|
||||
return false;
|
||||
}
|
||||
long replace = writableDatabase.replace("t_lr", FileDownloadModel.ID, c2);
|
||||
if (replace < 0) {
|
||||
return false;
|
||||
}
|
||||
x.c("[Database] insert %s success.", "t_lr");
|
||||
rVar.a = replace;
|
||||
return true;
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
if (!x.a(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:44:0x00a8 A[Catch: all -> 0x00b1, TRY_LEAVE, TryCatch #0 {all -> 0x00b1, blocks: (B:42:0x00a2, B:44:0x00a8), top: B:41:0x00a2, outer: #3 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:47:0x00ad A[Catch: all -> 0x00ba, TRY_ENTER, TryCatch #3 {, blocks: (B:3:0x0001, B:11:0x0032, B:37:0x009c, B:47:0x00ad, B:50:0x00b4, B:51:0x00b7, B:42:0x00a2, B:44:0x00a8), top: B:2:0x0001, inners: #0 }] */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public final synchronized java.util.List<com.tencent.bugly.proguard.r> a(int r11) {
|
||||
/*
|
||||
r10 = this;
|
||||
monitor-enter(r10)
|
||||
com.tencent.bugly.proguard.q r0 = com.tencent.bugly.proguard.p.b // Catch: java.lang.Throwable -> Lba
|
||||
android.database.sqlite.SQLiteDatabase r0 = r0.getWritableDatabase() // Catch: java.lang.Throwable -> Lba
|
||||
r9 = 0
|
||||
if (r0 == 0) goto Lb8
|
||||
if (r11 < 0) goto L21
|
||||
java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch: java.lang.Throwable -> L1c
|
||||
java.lang.String r2 = "_tp = "
|
||||
r1.<init>(r2) // Catch: java.lang.Throwable -> L1c
|
||||
r1.append(r11) // Catch: java.lang.Throwable -> L1c
|
||||
java.lang.String r11 = r1.toString() // Catch: java.lang.Throwable -> L1c
|
||||
r4 = r11
|
||||
goto L22
|
||||
L1c:
|
||||
r11 = move-exception
|
||||
r0 = r11
|
||||
r11 = r9
|
||||
goto La2
|
||||
L21:
|
||||
r4 = r9
|
||||
L22:
|
||||
java.lang.String r2 = "t_lr"
|
||||
r3 = 0
|
||||
r5 = 0
|
||||
r6 = 0
|
||||
r7 = 0
|
||||
r8 = 0
|
||||
r1 = r0
|
||||
android.database.Cursor r11 = r1.query(r2, r3, r4, r5, r6, r7, r8) // Catch: java.lang.Throwable -> L1c
|
||||
if (r11 != 0) goto L37
|
||||
if (r11 == 0) goto L35
|
||||
r11.close() // Catch: java.lang.Throwable -> Lba
|
||||
L35:
|
||||
monitor-exit(r10)
|
||||
return r9
|
||||
L37:
|
||||
java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch: java.lang.Throwable -> La1
|
||||
r1.<init>() // Catch: java.lang.Throwable -> La1
|
||||
java.util.ArrayList r2 = new java.util.ArrayList // Catch: java.lang.Throwable -> La1
|
||||
r2.<init>() // Catch: java.lang.Throwable -> La1
|
||||
L41:
|
||||
boolean r3 = r11.moveToNext() // Catch: java.lang.Throwable -> La1
|
||||
r4 = 0
|
||||
if (r3 == 0) goto L72
|
||||
com.tencent.bugly.proguard.r r3 = a(r11) // Catch: java.lang.Throwable -> La1
|
||||
if (r3 == 0) goto L52
|
||||
r2.add(r3) // Catch: java.lang.Throwable -> La1
|
||||
goto L41
|
||||
L52:
|
||||
java.lang.String r3 = "_id"
|
||||
int r3 = r11.getColumnIndex(r3) // Catch: java.lang.Throwable -> L6a
|
||||
long r5 = r11.getLong(r3) // Catch: java.lang.Throwable -> L6a
|
||||
java.lang.String r3 = " or _id"
|
||||
r1.append(r3) // Catch: java.lang.Throwable -> L6a
|
||||
java.lang.String r3 = " = "
|
||||
r1.append(r3) // Catch: java.lang.Throwable -> L6a
|
||||
r1.append(r5) // Catch: java.lang.Throwable -> L6a
|
||||
goto L41
|
||||
L6a:
|
||||
java.lang.String r3 = "[Database] unknown id."
|
||||
java.lang.Object[] r4 = new java.lang.Object[r4] // Catch: java.lang.Throwable -> La1
|
||||
com.tencent.bugly.proguard.x.d(r3, r4) // Catch: java.lang.Throwable -> La1
|
||||
goto L41
|
||||
L72:
|
||||
java.lang.String r1 = r1.toString() // Catch: java.lang.Throwable -> La1
|
||||
int r3 = r1.length() // Catch: java.lang.Throwable -> La1
|
||||
if (r3 <= 0) goto L9a
|
||||
r3 = 4
|
||||
java.lang.String r1 = r1.substring(r3) // Catch: java.lang.Throwable -> La1
|
||||
java.lang.String r3 = "t_lr"
|
||||
int r0 = r0.delete(r3, r1, r9) // Catch: java.lang.Throwable -> La1
|
||||
java.lang.String r1 = "[Database] deleted %s illegal data %d"
|
||||
r3 = 2
|
||||
java.lang.Object[] r3 = new java.lang.Object[r3] // Catch: java.lang.Throwable -> La1
|
||||
java.lang.String r5 = "t_lr"
|
||||
r3[r4] = r5 // Catch: java.lang.Throwable -> La1
|
||||
r4 = 1
|
||||
java.lang.Integer r0 = java.lang.Integer.valueOf(r0) // Catch: java.lang.Throwable -> La1
|
||||
r3[r4] = r0 // Catch: java.lang.Throwable -> La1
|
||||
com.tencent.bugly.proguard.x.d(r1, r3) // Catch: java.lang.Throwable -> La1
|
||||
L9a:
|
||||
if (r11 == 0) goto L9f
|
||||
r11.close() // Catch: java.lang.Throwable -> Lba
|
||||
L9f:
|
||||
monitor-exit(r10)
|
||||
return r2
|
||||
La1:
|
||||
r0 = move-exception
|
||||
La2:
|
||||
boolean r1 = com.tencent.bugly.proguard.x.a(r0) // Catch: java.lang.Throwable -> Lb1
|
||||
if (r1 != 0) goto Lab
|
||||
r0.printStackTrace() // Catch: java.lang.Throwable -> Lb1
|
||||
Lab:
|
||||
if (r11 == 0) goto Lb8
|
||||
r11.close() // Catch: java.lang.Throwable -> Lba
|
||||
goto Lb8
|
||||
Lb1:
|
||||
r0 = move-exception
|
||||
if (r11 == 0) goto Lb7
|
||||
r11.close() // Catch: java.lang.Throwable -> Lba
|
||||
Lb7:
|
||||
throw r0 // Catch: java.lang.Throwable -> Lba
|
||||
Lb8:
|
||||
monitor-exit(r10)
|
||||
return r9
|
||||
Lba:
|
||||
r11 = move-exception
|
||||
monitor-exit(r10)
|
||||
throw r11
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.p.a(int):java.util.List");
|
||||
}
|
||||
|
||||
public final synchronized void a(List<r> list) {
|
||||
if (list != null) {
|
||||
if (list.size() != 0) {
|
||||
SQLiteDatabase writableDatabase = b.getWritableDatabase();
|
||||
if (writableDatabase != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (r rVar : list) {
|
||||
sb.append(" or _id");
|
||||
sb.append(" = ");
|
||||
sb.append(rVar.a);
|
||||
}
|
||||
String sb2 = sb.toString();
|
||||
if (sb2.length() > 0) {
|
||||
sb2 = sb2.substring(4);
|
||||
}
|
||||
sb.setLength(0);
|
||||
try {
|
||||
x.c("[Database] deleted %s data %d", "t_lr", Integer.valueOf(writableDatabase.delete("t_lr", sb2, null)));
|
||||
} catch (Throwable th) {
|
||||
if (x.a(th)) {
|
||||
return;
|
||||
}
|
||||
th.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static r a(Cursor cursor) {
|
||||
if (cursor == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
r rVar = new r();
|
||||
rVar.a = cursor.getLong(cursor.getColumnIndex(FileDownloadModel.ID));
|
||||
rVar.b = cursor.getInt(cursor.getColumnIndex("_tp"));
|
||||
rVar.c = cursor.getString(cursor.getColumnIndex("_pc"));
|
||||
rVar.d = cursor.getString(cursor.getColumnIndex("_th"));
|
||||
rVar.e = cursor.getLong(cursor.getColumnIndex("_tm"));
|
||||
rVar.g = cursor.getBlob(cursor.getColumnIndex("_dt"));
|
||||
return rVar;
|
||||
} catch (Throwable th) {
|
||||
if (!x.a(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Code restructure failed: missing block: B:27:0x006e, code lost:
|
||||
|
||||
if (r7 != null) goto L14;
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public synchronized boolean a(int r5, java.lang.String r6, com.tencent.bugly.proguard.o r7) {
|
||||
/*
|
||||
r4 = this;
|
||||
monitor-enter(r4)
|
||||
r0 = 0
|
||||
com.tencent.bugly.proguard.q r1 = com.tencent.bugly.proguard.p.b // Catch: java.lang.Throwable -> L64
|
||||
android.database.sqlite.SQLiteDatabase r1 = r1.getWritableDatabase() // Catch: java.lang.Throwable -> L64
|
||||
if (r1 == 0) goto L5c
|
||||
boolean r2 = com.tencent.bugly.proguard.z.a(r6) // Catch: java.lang.Throwable -> L64
|
||||
if (r2 == 0) goto L1f
|
||||
java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch: java.lang.Throwable -> L64
|
||||
java.lang.String r2 = "_id = "
|
||||
r6.<init>(r2) // Catch: java.lang.Throwable -> L64
|
||||
r6.append(r5) // Catch: java.lang.Throwable -> L64
|
||||
java.lang.String r5 = r6.toString() // Catch: java.lang.Throwable -> L64
|
||||
goto L3f
|
||||
L1f:
|
||||
java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch: java.lang.Throwable -> L64
|
||||
java.lang.String r3 = "_id = "
|
||||
r2.<init>(r3) // Catch: java.lang.Throwable -> L64
|
||||
r2.append(r5) // Catch: java.lang.Throwable -> L64
|
||||
java.lang.String r5 = " and _tp"
|
||||
r2.append(r5) // Catch: java.lang.Throwable -> L64
|
||||
java.lang.String r5 = " = \""
|
||||
r2.append(r5) // Catch: java.lang.Throwable -> L64
|
||||
r2.append(r6) // Catch: java.lang.Throwable -> L64
|
||||
java.lang.String r5 = "\""
|
||||
r2.append(r5) // Catch: java.lang.Throwable -> L64
|
||||
java.lang.String r5 = r2.toString() // Catch: java.lang.Throwable -> L64
|
||||
L3f:
|
||||
java.lang.String r6 = "t_pf"
|
||||
r2 = 0
|
||||
int r5 = r1.delete(r6, r5, r2) // Catch: java.lang.Throwable -> L64
|
||||
java.lang.String r6 = "[Database] deleted %s data %d"
|
||||
r1 = 2
|
||||
java.lang.Object[] r1 = new java.lang.Object[r1] // Catch: java.lang.Throwable -> L64
|
||||
java.lang.String r2 = "t_pf"
|
||||
r1[r0] = r2 // Catch: java.lang.Throwable -> L64
|
||||
java.lang.Integer r2 = java.lang.Integer.valueOf(r5) // Catch: java.lang.Throwable -> L64
|
||||
r3 = 1
|
||||
r1[r3] = r2 // Catch: java.lang.Throwable -> L64
|
||||
com.tencent.bugly.proguard.x.c(r6, r1) // Catch: java.lang.Throwable -> L64
|
||||
if (r5 <= 0) goto L5c
|
||||
r0 = 1
|
||||
L5c:
|
||||
if (r7 == 0) goto L71
|
||||
L5e:
|
||||
java.lang.Boolean.valueOf(r0) // Catch: java.lang.Throwable -> L62
|
||||
goto L71
|
||||
L62:
|
||||
r5 = move-exception
|
||||
goto L7a
|
||||
L64:
|
||||
r5 = move-exception
|
||||
boolean r6 = com.tencent.bugly.proguard.x.a(r5) // Catch: java.lang.Throwable -> L73
|
||||
if (r6 != 0) goto L6e
|
||||
r5.printStackTrace() // Catch: java.lang.Throwable -> L73
|
||||
L6e:
|
||||
if (r7 == 0) goto L71
|
||||
goto L5e
|
||||
L71:
|
||||
monitor-exit(r4)
|
||||
return r0
|
||||
L73:
|
||||
r5 = move-exception
|
||||
if (r7 == 0) goto L79
|
||||
java.lang.Boolean.valueOf(r0) // Catch: java.lang.Throwable -> L62
|
||||
L79:
|
||||
throw r5 // Catch: java.lang.Throwable -> L62
|
||||
L7a:
|
||||
monitor-exit(r4)
|
||||
throw r5
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.p.a(int, java.lang.String, com.tencent.bugly.proguard.o):boolean");
|
||||
}
|
||||
}
|
273
sources/com/tencent/bugly/proguard/q.java
Normal file
273
sources/com/tencent/bugly/proguard/q.java
Normal file
@@ -0,0 +1,273 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import java.io.File;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class q extends SQLiteOpenHelper {
|
||||
public static String a = "bugly_db";
|
||||
private static int b = 15;
|
||||
private Context c;
|
||||
private List<com.tencent.bugly.a> d;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public q(Context context, List<com.tencent.bugly.a> list) {
|
||||
super(context, a + "_", (SQLiteDatabase.CursorFactory) null, b);
|
||||
com.tencent.bugly.crashreport.common.info.a.a(context).getClass();
|
||||
this.c = context;
|
||||
this.d = list;
|
||||
}
|
||||
|
||||
private synchronized boolean a(SQLiteDatabase sQLiteDatabase) {
|
||||
try {
|
||||
for (String str : new String[]{"t_lr", "t_ui", "t_pf"}) {
|
||||
sQLiteDatabase.execSQL("DROP TABLE IF EXISTS " + str, new String[0]);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
if (!x.b(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // android.database.sqlite.SQLiteOpenHelper
|
||||
public final synchronized SQLiteDatabase getReadableDatabase() {
|
||||
SQLiteDatabase sQLiteDatabase;
|
||||
sQLiteDatabase = null;
|
||||
int i = 0;
|
||||
while (sQLiteDatabase == null && i < 5) {
|
||||
i++;
|
||||
try {
|
||||
sQLiteDatabase = super.getReadableDatabase();
|
||||
} catch (Throwable unused) {
|
||||
x.d("[Database] Try to get db(count: %d).", Integer.valueOf(i));
|
||||
if (i == 5) {
|
||||
x.e("[Database] Failed to get db.", new Object[0]);
|
||||
}
|
||||
try {
|
||||
Thread.sleep(200L);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sQLiteDatabase;
|
||||
}
|
||||
|
||||
@Override // android.database.sqlite.SQLiteOpenHelper
|
||||
public final synchronized SQLiteDatabase getWritableDatabase() {
|
||||
SQLiteDatabase sQLiteDatabase;
|
||||
sQLiteDatabase = null;
|
||||
int i = 0;
|
||||
while (sQLiteDatabase == null && i < 5) {
|
||||
i++;
|
||||
try {
|
||||
sQLiteDatabase = super.getWritableDatabase();
|
||||
} catch (Throwable unused) {
|
||||
x.d("[Database] Try to get db(count: %d).", Integer.valueOf(i));
|
||||
if (i == 5) {
|
||||
x.e("[Database] Failed to get db.", new Object[0]);
|
||||
}
|
||||
try {
|
||||
Thread.sleep(200L);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sQLiteDatabase == null) {
|
||||
x.d("[Database] db error delay error record 1min.", new Object[0]);
|
||||
}
|
||||
return sQLiteDatabase;
|
||||
}
|
||||
|
||||
@Override // android.database.sqlite.SQLiteOpenHelper
|
||||
public final synchronized void onCreate(SQLiteDatabase sQLiteDatabase) {
|
||||
try {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.setLength(0);
|
||||
sb.append(" CREATE TABLE IF NOT EXISTS t_ui");
|
||||
sb.append(" ( _id");
|
||||
sb.append(" INTEGER PRIMARY KEY");
|
||||
sb.append(" , _tm");
|
||||
sb.append(" int");
|
||||
sb.append(" , _ut");
|
||||
sb.append(" int");
|
||||
sb.append(" , _tp");
|
||||
sb.append(" int");
|
||||
sb.append(" , _dt");
|
||||
sb.append(" blob");
|
||||
sb.append(" , _pc");
|
||||
sb.append(" text");
|
||||
sb.append(" ) ");
|
||||
x.c(sb.toString(), new Object[0]);
|
||||
sQLiteDatabase.execSQL(sb.toString(), new String[0]);
|
||||
sb.setLength(0);
|
||||
sb.append(" CREATE TABLE IF NOT EXISTS t_lr");
|
||||
sb.append(" ( _id");
|
||||
sb.append(" INTEGER PRIMARY KEY");
|
||||
sb.append(" , _tp");
|
||||
sb.append(" int");
|
||||
sb.append(" , _tm");
|
||||
sb.append(" int");
|
||||
sb.append(" , _pc");
|
||||
sb.append(" text");
|
||||
sb.append(" , _th");
|
||||
sb.append(" text");
|
||||
sb.append(" , _dt");
|
||||
sb.append(" blob");
|
||||
sb.append(" ) ");
|
||||
x.c(sb.toString(), new Object[0]);
|
||||
sQLiteDatabase.execSQL(sb.toString(), new String[0]);
|
||||
sb.setLength(0);
|
||||
sb.append(" CREATE TABLE IF NOT EXISTS t_pf");
|
||||
sb.append(" ( _id");
|
||||
sb.append(" integer");
|
||||
sb.append(" , _tp");
|
||||
sb.append(" text");
|
||||
sb.append(" , _tm");
|
||||
sb.append(" int");
|
||||
sb.append(" , _dt");
|
||||
sb.append(" blob");
|
||||
sb.append(",primary key(_id");
|
||||
sb.append(",_tp");
|
||||
sb.append(" )) ");
|
||||
x.c(sb.toString(), new Object[0]);
|
||||
sQLiteDatabase.execSQL(sb.toString(), new String[0]);
|
||||
sb.setLength(0);
|
||||
sb.append(" CREATE TABLE IF NOT EXISTS t_cr");
|
||||
sb.append(" ( _id");
|
||||
sb.append(" INTEGER PRIMARY KEY");
|
||||
sb.append(" , _tm");
|
||||
sb.append(" int");
|
||||
sb.append(" , _s1");
|
||||
sb.append(" text");
|
||||
sb.append(" , _up");
|
||||
sb.append(" int");
|
||||
sb.append(" , _me");
|
||||
sb.append(" int");
|
||||
sb.append(" , _uc");
|
||||
sb.append(" int");
|
||||
sb.append(" , _dt");
|
||||
sb.append(" blob");
|
||||
sb.append(" ) ");
|
||||
x.c(sb.toString(), new Object[0]);
|
||||
sQLiteDatabase.execSQL(sb.toString(), new String[0]);
|
||||
sb.setLength(0);
|
||||
sb.append(" CREATE TABLE IF NOT EXISTS dl_1002");
|
||||
sb.append(" (_id");
|
||||
sb.append(" integer primary key autoincrement, _dUrl");
|
||||
sb.append(" varchar(100), _sFile");
|
||||
sb.append(" varchar(100), _sLen");
|
||||
sb.append(" INTEGER, _tLen");
|
||||
sb.append(" INTEGER, _MD5");
|
||||
sb.append(" varchar(100), _DLTIME");
|
||||
sb.append(" INTEGER)");
|
||||
x.c(sb.toString(), new Object[0]);
|
||||
sQLiteDatabase.execSQL(sb.toString(), new String[0]);
|
||||
sb.setLength(0);
|
||||
sb.append("CREATE TABLE IF NOT EXISTS ge_1002");
|
||||
sb.append(" (_id");
|
||||
sb.append(" integer primary key autoincrement, _time");
|
||||
sb.append(" INTEGER, _datas");
|
||||
sb.append(" blob)");
|
||||
x.c(sb.toString(), new Object[0]);
|
||||
sQLiteDatabase.execSQL(sb.toString(), new String[0]);
|
||||
sb.setLength(0);
|
||||
sb.append(" CREATE TABLE IF NOT EXISTS st_1002");
|
||||
sb.append(" ( _id");
|
||||
sb.append(" integer");
|
||||
sb.append(" , _tp");
|
||||
sb.append(" text");
|
||||
sb.append(" , _tm");
|
||||
sb.append(" int");
|
||||
sb.append(" , _dt");
|
||||
sb.append(" blob");
|
||||
sb.append(",primary key(_id");
|
||||
sb.append(",_tp");
|
||||
sb.append(" )) ");
|
||||
x.c(sb.toString(), new Object[0]);
|
||||
sQLiteDatabase.execSQL(sb.toString(), new String[0]);
|
||||
} catch (Throwable th) {
|
||||
if (!x.b(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (this.d == null) {
|
||||
return;
|
||||
}
|
||||
Iterator<com.tencent.bugly.a> it = this.d.iterator();
|
||||
while (it.hasNext()) {
|
||||
try {
|
||||
it.next().onDbCreate(sQLiteDatabase);
|
||||
} catch (Throwable th2) {
|
||||
if (!x.b(th2)) {
|
||||
th2.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.database.sqlite.SQLiteOpenHelper
|
||||
@TargetApi(11)
|
||||
public final synchronized void onDowngrade(SQLiteDatabase sQLiteDatabase, int i, int i2) {
|
||||
if (com.tencent.bugly.crashreport.common.info.b.c() >= 11) {
|
||||
x.d("[Database] Downgrade %d to %d drop tables.", Integer.valueOf(i), Integer.valueOf(i2));
|
||||
if (this.d != null) {
|
||||
Iterator<com.tencent.bugly.a> it = this.d.iterator();
|
||||
while (it.hasNext()) {
|
||||
try {
|
||||
it.next().onDbDowngrade(sQLiteDatabase, i, i2);
|
||||
} catch (Throwable th) {
|
||||
if (!x.b(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (a(sQLiteDatabase)) {
|
||||
onCreate(sQLiteDatabase);
|
||||
return;
|
||||
}
|
||||
x.d("[Database] Failed to drop, delete db.", new Object[0]);
|
||||
File databasePath = this.c.getDatabasePath(a);
|
||||
if (databasePath != null && databasePath.canWrite()) {
|
||||
databasePath.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.database.sqlite.SQLiteOpenHelper
|
||||
public final synchronized void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) {
|
||||
x.d("[Database] Upgrade %d to %d , drop tables!", Integer.valueOf(i), Integer.valueOf(i2));
|
||||
if (this.d != null) {
|
||||
Iterator<com.tencent.bugly.a> it = this.d.iterator();
|
||||
while (it.hasNext()) {
|
||||
try {
|
||||
it.next().onDbUpgrade(sQLiteDatabase, i, i2);
|
||||
} catch (Throwable th) {
|
||||
if (!x.b(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (a(sQLiteDatabase)) {
|
||||
onCreate(sQLiteDatabase);
|
||||
return;
|
||||
}
|
||||
x.d("[Database] Failed to drop, delete db.", new Object[0]);
|
||||
File databasePath = this.c.getDatabasePath(a);
|
||||
if (databasePath != null && databasePath.canWrite()) {
|
||||
databasePath.delete();
|
||||
}
|
||||
}
|
||||
}
|
13
sources/com/tencent/bugly/proguard/r.java
Normal file
13
sources/com/tencent/bugly/proguard/r.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class r {
|
||||
public long a;
|
||||
public int b;
|
||||
public String c;
|
||||
public String d;
|
||||
public long e;
|
||||
public String f;
|
||||
public byte[] g;
|
||||
}
|
177
sources/com/tencent/bugly/proguard/s.java
Normal file
177
sources/com/tencent/bugly/proguard/s.java
Normal file
@@ -0,0 +1,177 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.content.Context;
|
||||
import com.ijm.dataencryption.de.DataDecryptTool;
|
||||
import com.tencent.bugly.BuglyStrategy;
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Proxy;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class s {
|
||||
private static s b;
|
||||
public Map<String, String> a = null;
|
||||
private Context c;
|
||||
|
||||
private s(Context context) {
|
||||
this.c = context;
|
||||
}
|
||||
|
||||
public static s a(Context context) {
|
||||
if (b == null) {
|
||||
b = new s(context);
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
private static byte[] b(HttpURLConnection httpURLConnection) {
|
||||
BufferedInputStream bufferedInputStream;
|
||||
if (httpURLConnection == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
bufferedInputStream = new BufferedInputStream(httpURLConnection.getInputStream());
|
||||
} catch (Throwable th) {
|
||||
th = th;
|
||||
bufferedInputStream = null;
|
||||
}
|
||||
try {
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
byte[] bArr = new byte[DataDecryptTool.DECRYPT_SP_FILE];
|
||||
while (true) {
|
||||
int read = bufferedInputStream.read(bArr);
|
||||
if (read <= 0) {
|
||||
break;
|
||||
}
|
||||
byteArrayOutputStream.write(bArr, 0, read);
|
||||
}
|
||||
byteArrayOutputStream.flush();
|
||||
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
||||
try {
|
||||
bufferedInputStream.close();
|
||||
} catch (Throwable th2) {
|
||||
th2.printStackTrace();
|
||||
}
|
||||
return byteArray;
|
||||
} catch (Throwable th3) {
|
||||
th = th3;
|
||||
try {
|
||||
if (!x.a(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
} finally {
|
||||
if (bufferedInputStream != null) {
|
||||
try {
|
||||
bufferedInputStream.close();
|
||||
} catch (Throwable th4) {
|
||||
th4.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:72:0x018a A[Catch: all -> 0x017d, TRY_LEAVE, TryCatch #9 {all -> 0x017d, blocks: (B:24:0x009b, B:26:0x00a3, B:29:0x00b4, B:39:0x00b2, B:85:0x00dd, B:104:0x00e5, B:91:0x0116, B:94:0x0120, B:52:0x013f, B:57:0x0162, B:70:0x0184, B:72:0x018a), top: B:23:0x009b }] */
|
||||
/* JADX WARN: Unreachable blocks removed: 2, instructions: 2 */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public final byte[] a(java.lang.String r23, byte[] r24, com.tencent.bugly.proguard.v r25, java.util.Map<java.lang.String, java.lang.String> r26) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 456
|
||||
To view this dump change 'Code comments level' option to 'DEBUG'
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.s.a(java.lang.String, byte[], com.tencent.bugly.proguard.v, java.util.Map):byte[]");
|
||||
}
|
||||
|
||||
private static Map<String, String> a(HttpURLConnection httpURLConnection) {
|
||||
HashMap hashMap = new HashMap();
|
||||
Map<String, List<String>> headerFields = httpURLConnection.getHeaderFields();
|
||||
if (headerFields == null || headerFields.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
for (String str : headerFields.keySet()) {
|
||||
List<String> list = headerFields.get(str);
|
||||
if (list.size() > 0) {
|
||||
hashMap.put(str, list.get(0));
|
||||
}
|
||||
}
|
||||
return hashMap;
|
||||
}
|
||||
|
||||
private HttpURLConnection a(String str, byte[] bArr, String str2, Map<String, String> map) {
|
||||
if (str == null) {
|
||||
x.e("destUrl is null.", new Object[0]);
|
||||
return null;
|
||||
}
|
||||
HttpURLConnection a = a(str2, str);
|
||||
if (a == null) {
|
||||
x.e("Failed to get HttpURLConnection object.", new Object[0]);
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
a.setRequestProperty("wup_version", "3.0");
|
||||
if (map != null && map.size() > 0) {
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
a.setRequestProperty(entry.getKey(), URLEncoder.encode(entry.getValue(), "utf-8"));
|
||||
}
|
||||
}
|
||||
a.setRequestProperty("A37", URLEncoder.encode(str2, "utf-8"));
|
||||
a.setRequestProperty("A38", URLEncoder.encode(str2, "utf-8"));
|
||||
OutputStream outputStream = a.getOutputStream();
|
||||
if (bArr == null) {
|
||||
outputStream.write(0);
|
||||
} else {
|
||||
outputStream.write(bArr);
|
||||
}
|
||||
return a;
|
||||
} catch (Throwable th) {
|
||||
if (!x.a(th)) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
x.e("Failed to upload, please check your network.", new Object[0]);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static HttpURLConnection a(String str, String str2) {
|
||||
HttpURLConnection httpURLConnection;
|
||||
try {
|
||||
URL url = new URL(str2);
|
||||
if (a.b() != null) {
|
||||
httpURLConnection = (HttpURLConnection) url.openConnection(a.b());
|
||||
} else if (str != null && str.toLowerCase(Locale.US).contains("wap")) {
|
||||
httpURLConnection = (HttpURLConnection) url.openConnection(new Proxy(Proxy.Type.HTTP, new InetSocketAddress(System.getProperty("http.proxyHost"), Integer.parseInt(System.getProperty("http.proxyPort")))));
|
||||
} else {
|
||||
httpURLConnection = (HttpURLConnection) url.openConnection();
|
||||
}
|
||||
httpURLConnection.setConnectTimeout(BuglyStrategy.a.MAX_USERDATA_VALUE_LENGTH);
|
||||
httpURLConnection.setReadTimeout(XStream.PRIORITY_VERY_HIGH);
|
||||
httpURLConnection.setDoOutput(true);
|
||||
httpURLConnection.setDoInput(true);
|
||||
httpURLConnection.setRequestMethod("POST");
|
||||
httpURLConnection.setUseCaches(false);
|
||||
httpURLConnection.setInstanceFollowRedirects(false);
|
||||
return httpURLConnection;
|
||||
} catch (Throwable th) {
|
||||
if (x.a(th)) {
|
||||
return null;
|
||||
}
|
||||
th.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
7
sources/com/tencent/bugly/proguard/t.java
Normal file
7
sources/com/tencent/bugly/proguard/t.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public interface t {
|
||||
void a(boolean z);
|
||||
}
|
620
sources/com/tencent/bugly/proguard/u.java
Normal file
620
sources/com/tencent/bugly/proguard/u.java
Normal file
@@ -0,0 +1,620 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Process;
|
||||
import android.util.Base64;
|
||||
import com.ubtrobot.jimu.robotapi.PeripheralType;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class u {
|
||||
private static u b;
|
||||
public boolean a;
|
||||
private final Context d;
|
||||
private long f;
|
||||
private long g;
|
||||
private String k;
|
||||
private Map<Integer, Long> e = new HashMap();
|
||||
private LinkedBlockingQueue<Runnable> h = new LinkedBlockingQueue<>();
|
||||
private LinkedBlockingQueue<Runnable> i = new LinkedBlockingQueue<>();
|
||||
private final Object j = new Object();
|
||||
private byte[] l = null;
|
||||
private long m = 0;
|
||||
private byte[] n = null;
|
||||
private long o = 0;
|
||||
private String p = null;
|
||||
private long q = 0;
|
||||
private final Object r = new Object();
|
||||
private boolean s = false;
|
||||
private final Object t = new Object();
|
||||
private int u = 0;
|
||||
private final p c = p.a();
|
||||
|
||||
private u(Context context) {
|
||||
this.k = null;
|
||||
this.a = true;
|
||||
this.d = context;
|
||||
try {
|
||||
Class.forName("android.util.Base64");
|
||||
} catch (ClassNotFoundException unused) {
|
||||
x.a("[UploadManager] Error: Can not find Base64 class, will not use stronger security way to upload", new Object[0]);
|
||||
this.a = false;
|
||||
}
|
||||
if (this.a) {
|
||||
this.k = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDP9x32s5pPtZBXzJBz2GWM/sbTvVO2+RvW0PH01IdaBxc/fB6fbHZocC9T3nl1+J5eAFjIRVuV8vHDky7Qo82Mnh0PVvcZIEQvMMVKU8dsMQopxgsOs2gkSHJwgWdinKNS8CmWobo6pFwPUW11lMv714jAUZRq2GBOqiO2vQI6iwIDAQAB";
|
||||
}
|
||||
}
|
||||
|
||||
static /* synthetic */ int b(u uVar) {
|
||||
int i = uVar.u - 1;
|
||||
uVar.u = i;
|
||||
return i;
|
||||
}
|
||||
|
||||
private static boolean c() {
|
||||
x.c("[UploadManager] Drop security info of database (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
try {
|
||||
p a2 = p.a();
|
||||
if (a2 != null) {
|
||||
return a2.a(555, "security_info", (o) null, true);
|
||||
}
|
||||
x.d("[UploadManager] Failed to get Database", new Object[0]);
|
||||
return false;
|
||||
} catch (Throwable th) {
|
||||
x.a(th);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean d() {
|
||||
x.c("[UploadManager] Record security info to database (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
try {
|
||||
p a2 = p.a();
|
||||
if (a2 == null) {
|
||||
x.d("[UploadManager] Failed to get database", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (this.n == null) {
|
||||
x.c("[UploadManager] AES key is null, will not record", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
sb.append(Base64.encodeToString(this.n, 0));
|
||||
sb.append("#");
|
||||
if (this.o != 0) {
|
||||
sb.append(Long.toString(this.o));
|
||||
} else {
|
||||
sb.append("null");
|
||||
}
|
||||
sb.append("#");
|
||||
if (this.p != null) {
|
||||
sb.append(this.p);
|
||||
} else {
|
||||
sb.append("null");
|
||||
}
|
||||
sb.append("#");
|
||||
if (this.q != 0) {
|
||||
sb.append(Long.toString(this.q));
|
||||
} else {
|
||||
sb.append("null");
|
||||
}
|
||||
a2.a(555, "security_info", sb.toString().getBytes(), (o) null, true);
|
||||
return true;
|
||||
} catch (Throwable th) {
|
||||
x.a(th);
|
||||
c();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Removed duplicated region for block: B:52:0x00de A[Catch: all -> 0x00e2, TRY_LEAVE, TryCatch #0 {all -> 0x00e2, blocks: (B:3:0x0020, B:5:0x0026, B:8:0x002e, B:10:0x0037, B:12:0x003d, B:14:0x0052, B:17:0x005c, B:23:0x006e, B:25:0x0076, B:27:0x007e, B:33:0x0090, B:35:0x0096, B:37:0x009e, B:39:0x00a6, B:41:0x00ac, B:43:0x00b5, B:49:0x00c7, B:52:0x00de, B:54:0x00cb, B:46:0x00bd, B:20:0x0064, B:30:0x0086), top: B:2:0x0020, inners: #1, #2, #3 }] */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public boolean e() {
|
||||
/*
|
||||
Method dump skipped, instructions count: 231
|
||||
To view this dump change 'Code comments level' option to 'DEBUG'
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.u.e():boolean");
|
||||
}
|
||||
|
||||
public final boolean b(int i) {
|
||||
if (com.tencent.bugly.b.c) {
|
||||
x.c("Uploading frequency will not be checked if SDK is in debug mode.", new Object[0]);
|
||||
return true;
|
||||
}
|
||||
long currentTimeMillis = System.currentTimeMillis() - a(i);
|
||||
x.c("[UploadManager] Time interval is %d seconds since last uploading(ID: %d).", Long.valueOf(currentTimeMillis / 1000), Integer.valueOf(i));
|
||||
if (currentTimeMillis >= 30000) {
|
||||
return true;
|
||||
}
|
||||
x.a("[UploadManager] Data only be uploaded once in %d seconds.", 30L);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
class a implements Runnable {
|
||||
private final Context a;
|
||||
private final Runnable b;
|
||||
private final long c;
|
||||
|
||||
public a(Context context) {
|
||||
this.a = context;
|
||||
this.b = null;
|
||||
this.c = 0L;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
if (!z.a(this.a, "security_info", 30000L)) {
|
||||
x.c("[UploadManager] Sleep %d try to lock security file again (pid=%d | tid=%d)", 5000, Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
z.b(5000L);
|
||||
if (z.a(this, "BUGLY_ASYNC_UPLOAD") == null) {
|
||||
x.d("[UploadManager] Failed to start a thread to execute task of initializing security context, try to post it into thread pool.", new Object[0]);
|
||||
w a = w.a();
|
||||
if (a != null) {
|
||||
a.a(this);
|
||||
return;
|
||||
} else {
|
||||
x.e("[UploadManager] Asynchronous thread pool is unavailable now, try next time.", new Object[0]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!u.this.e()) {
|
||||
x.d("[UploadManager] Failed to load security info from database", new Object[0]);
|
||||
u.this.b(false);
|
||||
}
|
||||
if (u.this.p != null) {
|
||||
if (u.this.b()) {
|
||||
x.c("[UploadManager] Sucessfully got session ID, try to execute upload tasks now (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
Runnable runnable = this.b;
|
||||
if (runnable != null) {
|
||||
u.this.a(runnable, this.c);
|
||||
}
|
||||
u.this.c(0);
|
||||
z.b(this.a, "security_info");
|
||||
synchronized (u.this.t) {
|
||||
u.a(u.this, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
x.a("[UploadManager] Session ID is expired, drop it.", new Object[0]);
|
||||
u.this.b(true);
|
||||
}
|
||||
byte[] a2 = z.a(PeripheralType.SERVO);
|
||||
if (a2 == null || (a2.length << 3) != 128) {
|
||||
x.d("[UploadManager] Failed to create AES key (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
u.this.b(false);
|
||||
z.b(this.a, "security_info");
|
||||
synchronized (u.this.t) {
|
||||
u.a(u.this, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
u.this.n = a2;
|
||||
x.c("[UploadManager] Execute one upload task for requesting session ID (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
Runnable runnable2 = this.b;
|
||||
if (runnable2 != null) {
|
||||
u.this.a(runnable2, this.c);
|
||||
} else {
|
||||
u.this.c(1);
|
||||
}
|
||||
}
|
||||
|
||||
public a(Context context, Runnable runnable, long j) {
|
||||
this.a = context;
|
||||
this.b = runnable;
|
||||
this.c = j;
|
||||
}
|
||||
}
|
||||
|
||||
static /* synthetic */ boolean a(u uVar, boolean z) {
|
||||
uVar.s = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static synchronized u a(Context context) {
|
||||
u uVar;
|
||||
synchronized (u.class) {
|
||||
if (b == null) {
|
||||
b = new u(context);
|
||||
}
|
||||
uVar = b;
|
||||
}
|
||||
return uVar;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Removed duplicated region for block: B:23:0x006c A[Catch: all -> 0x0159, TRY_LEAVE, TryCatch #3 {, blocks: (B:9:0x001c, B:12:0x0049, B:13:0x0050, B:19:0x0062, B:23:0x006c, B:29:0x008d, B:31:0x0080, B:36:0x0093, B:42:0x00b4, B:44:0x00a7, B:47:0x00b7, B:93:0x0059, B:95:0x005d, B:39:0x009d, B:26:0x0076), top: B:8:0x001c, inners: #0, #4 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:36:0x0093 A[Catch: all -> 0x0159, TRY_LEAVE, TryCatch #3 {, blocks: (B:9:0x001c, B:12:0x0049, B:13:0x0050, B:19:0x0062, B:23:0x006c, B:29:0x008d, B:31:0x0080, B:36:0x0093, B:42:0x00b4, B:44:0x00a7, B:47:0x00b7, B:93:0x0059, B:95:0x005d, B:39:0x009d, B:26:0x0076), top: B:8:0x001c, inners: #0, #4 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:50:0x00bb */
|
||||
/* JADX WARN: Removed duplicated region for block: B:53:0x00df */
|
||||
/* JADX WARN: Removed duplicated region for block: B:84:0x012d */
|
||||
/* JADX WARN: Removed duplicated region for block: B:86:0x0150 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:88:? A[RETURN, SYNTHETIC] */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public void c(int r13) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 348
|
||||
To view this dump change 'Code comments level' option to 'DEBUG'
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.u.c(int):void");
|
||||
}
|
||||
|
||||
protected final boolean b() {
|
||||
if (this.p == null || this.q == 0) {
|
||||
return false;
|
||||
}
|
||||
long currentTimeMillis = System.currentTimeMillis() + this.m;
|
||||
long j = this.q;
|
||||
if (j >= currentTimeMillis) {
|
||||
return true;
|
||||
}
|
||||
x.c("[UploadManager] Session ID expired time from server is: %d(%s), but now is: %d(%s)", Long.valueOf(j), new Date(this.q).toString(), Long.valueOf(currentTimeMillis), new Date(currentTimeMillis).toString());
|
||||
return false;
|
||||
}
|
||||
|
||||
public static synchronized u a() {
|
||||
u uVar;
|
||||
synchronized (u.class) {
|
||||
uVar = b;
|
||||
}
|
||||
return uVar;
|
||||
}
|
||||
|
||||
public final void a(int i, ap apVar, String str, String str2, t tVar, long j, boolean z) {
|
||||
try {
|
||||
a(new v(this.d, i, apVar.g, com.tencent.bugly.proguard.a.a((Object) apVar), str, str2, tVar, this.a, z), true, true, j);
|
||||
} catch (Throwable th) {
|
||||
if (x.a(th)) {
|
||||
return;
|
||||
}
|
||||
th.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(int i, int i2, byte[] bArr, String str, String str2, t tVar, int i3, int i4, boolean z, Map<String, String> map) {
|
||||
try {
|
||||
a(new v(this.d, i, i2, bArr, str, str2, tVar, this.a, i3, i4, false, map), z, false, 0L);
|
||||
} catch (Throwable th) {
|
||||
if (x.a(th)) {
|
||||
return;
|
||||
}
|
||||
th.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
protected final void b(boolean z) {
|
||||
synchronized (this.r) {
|
||||
x.c("[UploadManager] Clear security context (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
this.n = null;
|
||||
this.p = null;
|
||||
this.q = 0L;
|
||||
}
|
||||
if (z) {
|
||||
c();
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(int i, ap apVar, String str, String str2, t tVar, boolean z) {
|
||||
a(i, apVar.g, com.tencent.bugly.proguard.a.a((Object) apVar), str, str2, tVar, 0, 0, z, null);
|
||||
}
|
||||
|
||||
public final long a(boolean z) {
|
||||
long j;
|
||||
long b2 = z.b();
|
||||
int i = z ? 5 : 3;
|
||||
List<r> a2 = this.c.a(i);
|
||||
if (a2 != null && a2.size() > 0) {
|
||||
j = 0;
|
||||
try {
|
||||
r rVar = a2.get(0);
|
||||
if (rVar.e >= b2) {
|
||||
j = z.c(rVar.g);
|
||||
if (i == 3) {
|
||||
this.f = j;
|
||||
} else {
|
||||
this.g = j;
|
||||
}
|
||||
a2.remove(rVar);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
x.a(th);
|
||||
}
|
||||
if (a2.size() > 0) {
|
||||
this.c.a(a2);
|
||||
}
|
||||
} else {
|
||||
j = z ? this.g : this.f;
|
||||
}
|
||||
x.c("[UploadManager] Local network consume: %d KB", Long.valueOf(j / 1024));
|
||||
return j;
|
||||
}
|
||||
|
||||
public final byte[] b(byte[] bArr) {
|
||||
byte[] bArr2 = this.n;
|
||||
if (bArr2 != null && (bArr2.length << 3) == 128) {
|
||||
return z.a(2, bArr, bArr2);
|
||||
}
|
||||
x.d("[UploadManager] AES key is invalid (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
return null;
|
||||
}
|
||||
|
||||
protected final synchronized void a(long j, boolean z) {
|
||||
int i = z ? 5 : 3;
|
||||
r rVar = new r();
|
||||
rVar.b = i;
|
||||
rVar.e = z.b();
|
||||
rVar.c = "";
|
||||
rVar.d = "";
|
||||
rVar.g = z.c(j);
|
||||
this.c.b(i);
|
||||
this.c.a(rVar);
|
||||
if (z) {
|
||||
this.g = j;
|
||||
} else {
|
||||
this.f = j;
|
||||
}
|
||||
x.c("[UploadManager] Network total consume: %d KB", Long.valueOf(j / 1024));
|
||||
}
|
||||
|
||||
public final synchronized void a(int i, long j) {
|
||||
if (i < 0) {
|
||||
x.e("[UploadManager] Unknown uploading ID: %d", Integer.valueOf(i));
|
||||
return;
|
||||
}
|
||||
this.e.put(Integer.valueOf(i), Long.valueOf(j));
|
||||
r rVar = new r();
|
||||
rVar.b = i;
|
||||
rVar.e = j;
|
||||
rVar.c = "";
|
||||
rVar.d = "";
|
||||
rVar.g = new byte[0];
|
||||
this.c.b(i);
|
||||
this.c.a(rVar);
|
||||
x.c("[UploadManager] Uploading(ID:%d) time: %s", Integer.valueOf(i), z.a(j));
|
||||
}
|
||||
|
||||
public final synchronized long a(int i) {
|
||||
long j = 0;
|
||||
if (i >= 0) {
|
||||
Long l = this.e.get(Integer.valueOf(i));
|
||||
if (l != null) {
|
||||
return l.longValue();
|
||||
}
|
||||
List<r> a2 = this.c.a(i);
|
||||
if (a2 != null && a2.size() > 0) {
|
||||
if (a2.size() > 1) {
|
||||
for (r rVar : a2) {
|
||||
if (rVar.e > j) {
|
||||
j = rVar.e;
|
||||
}
|
||||
}
|
||||
this.c.b(i);
|
||||
} else {
|
||||
try {
|
||||
j = a2.get(0).e;
|
||||
} catch (Throwable th) {
|
||||
x.a(th);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
x.e("[UploadManager] Unknown upload ID: %d", Integer.valueOf(i));
|
||||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
private boolean a(Runnable runnable, boolean z) {
|
||||
if (runnable == null) {
|
||||
x.a("[UploadManager] Upload task should not be null", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
x.c("[UploadManager] Add upload task to queue (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
synchronized (this.j) {
|
||||
if (z) {
|
||||
this.h.put(runnable);
|
||||
} else {
|
||||
this.i.put(runnable);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} catch (Throwable th) {
|
||||
x.e("[UploadManager] Failed to add upload task to queue: %s", th.getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void a(Runnable runnable, long j) {
|
||||
if (runnable == null) {
|
||||
x.d("[UploadManager] Upload task should not be null", new Object[0]);
|
||||
return;
|
||||
}
|
||||
x.c("[UploadManager] Execute synchronized upload task (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
Thread a2 = z.a(runnable, "BUGLY_SYNC_UPLOAD");
|
||||
if (a2 == null) {
|
||||
x.e("[UploadManager] Failed to start a thread to execute synchronized upload task, add it to queue.", new Object[0]);
|
||||
a(runnable, true);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
a2.join(j);
|
||||
} catch (Throwable th) {
|
||||
x.e("[UploadManager] Failed to join upload synchronized task with message: %s. Add it to queue.", th.getMessage());
|
||||
a(runnable, true);
|
||||
c(0);
|
||||
}
|
||||
}
|
||||
|
||||
private void a(Runnable runnable, boolean z, boolean z2, long j) {
|
||||
if (runnable == null) {
|
||||
x.d("[UploadManager] Upload task should not be null", new Object[0]);
|
||||
}
|
||||
x.c("[UploadManager] Add upload task (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
if (this.p != null) {
|
||||
if (b()) {
|
||||
x.c("[UploadManager] Sucessfully got session ID, try to execute upload task now (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
if (z2) {
|
||||
a(runnable, j);
|
||||
return;
|
||||
} else {
|
||||
a(runnable, z);
|
||||
c(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
x.a("[UploadManager] Session ID is expired, drop it (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
b(false);
|
||||
}
|
||||
synchronized (this.t) {
|
||||
if (this.s) {
|
||||
a(runnable, z);
|
||||
return;
|
||||
}
|
||||
this.s = true;
|
||||
x.c("[UploadManager] Initialize security context now (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
if (z2) {
|
||||
a(new a(this.d, runnable, j), 0L);
|
||||
return;
|
||||
}
|
||||
a(runnable, z);
|
||||
a aVar = new a(this.d);
|
||||
x.a("[UploadManager] Create and start a new thread to execute a task of initializing security context: %s", "BUGLY_ASYNC_UPLOAD");
|
||||
if (z.a(aVar, "BUGLY_ASYNC_UPLOAD") == null) {
|
||||
x.d("[UploadManager] Failed to start a thread to execute task of initializing security context, try to post it into thread pool.", new Object[0]);
|
||||
w a2 = w.a();
|
||||
if (a2 != null) {
|
||||
a2.a(aVar);
|
||||
return;
|
||||
}
|
||||
x.e("[UploadManager] Asynchronous thread pool is unavailable now, try next time.", new Object[0]);
|
||||
synchronized (this.t) {
|
||||
this.s = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(int i, aq aqVar) {
|
||||
if (this.a) {
|
||||
boolean z = true;
|
||||
if (i == 2) {
|
||||
x.c("[UploadManager] Session ID is invalid, will clear security context (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
b(true);
|
||||
} else {
|
||||
synchronized (this.t) {
|
||||
if (!this.s) {
|
||||
return;
|
||||
}
|
||||
if (aqVar != null) {
|
||||
x.c("[UploadManager] Record security context (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
try {
|
||||
Map<String, String> map = aqVar.g;
|
||||
if (map != null && map.containsKey("S1") && map.containsKey("S2")) {
|
||||
this.m = aqVar.e - System.currentTimeMillis();
|
||||
x.c("[UploadManager] Time lag of server is: %d", Long.valueOf(this.m));
|
||||
this.p = map.get("S1");
|
||||
x.c("[UploadManager] Session ID from server is: %s", this.p);
|
||||
if (this.p.length() > 0) {
|
||||
try {
|
||||
this.q = Long.parseLong(map.get("S2"));
|
||||
x.c("[UploadManager] Session expired time from server is: %d(%s)", Long.valueOf(this.q), new Date(this.q).toString());
|
||||
if (this.q < 1000) {
|
||||
x.d("[UploadManager] Session expired time from server is less than 1 second, will set to default value", new Object[0]);
|
||||
this.q = 259200000L;
|
||||
}
|
||||
} catch (NumberFormatException unused) {
|
||||
x.d("[UploadManager] Session expired time is invalid, will set to default value", new Object[0]);
|
||||
this.q = 259200000L;
|
||||
}
|
||||
if (d()) {
|
||||
z = false;
|
||||
} else {
|
||||
x.c("[UploadManager] Failed to record database", new Object[0]);
|
||||
}
|
||||
c(0);
|
||||
} else {
|
||||
x.c("[UploadManager] Session ID from server is invalid, try next time", new Object[0]);
|
||||
}
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
x.a(th);
|
||||
}
|
||||
if (z) {
|
||||
b(false);
|
||||
}
|
||||
} else {
|
||||
x.c("[UploadManager] Fail to init security context and clear local info (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
b(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
synchronized (this.t) {
|
||||
if (this.s) {
|
||||
this.s = false;
|
||||
z.b(this.d, "security_info");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final byte[] a(byte[] bArr) {
|
||||
byte[] bArr2 = this.n;
|
||||
if (bArr2 != null && (bArr2.length << 3) == 128) {
|
||||
return z.a(1, bArr, bArr2);
|
||||
}
|
||||
x.d("[UploadManager] AES key is invalid (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
return null;
|
||||
}
|
||||
|
||||
public final boolean a(Map<String, String> map) {
|
||||
if (map == null) {
|
||||
return false;
|
||||
}
|
||||
x.c("[UploadManager] Integrate security to HTTP headers (pid=%d | tid=%d)", Integer.valueOf(Process.myPid()), Integer.valueOf(Process.myTid()));
|
||||
String str = this.p;
|
||||
if (str != null) {
|
||||
map.put("secureSessionId", str);
|
||||
return true;
|
||||
}
|
||||
byte[] bArr = this.n;
|
||||
if (bArr != null && (bArr.length << 3) == 128) {
|
||||
if (this.l == null) {
|
||||
this.l = Base64.decode(this.k, 0);
|
||||
if (this.l == null) {
|
||||
x.d("[UploadManager] Failed to decode RSA public key", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
byte[] b2 = z.b(1, this.n, this.l);
|
||||
if (b2 == null) {
|
||||
x.d("[UploadManager] Failed to encrypt AES key", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
String encodeToString = Base64.encodeToString(b2, 0);
|
||||
if (encodeToString == null) {
|
||||
x.d("[UploadManager] Failed to encode AES key", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
map.put("raKey", encodeToString);
|
||||
return true;
|
||||
}
|
||||
x.d("[UploadManager] AES key is invalid", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
}
|
227
sources/com/tencent/bugly/proguard/v.java
Normal file
227
sources/com/tencent/bugly/proguard/v.java
Normal file
@@ -0,0 +1,227 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.content.Context;
|
||||
import com.tencent.bugly.BuglyStrategy;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class v implements Runnable {
|
||||
private int a;
|
||||
private int b;
|
||||
private final Context c;
|
||||
private final int d;
|
||||
private final byte[] e;
|
||||
private final com.tencent.bugly.crashreport.common.info.a f;
|
||||
private final com.tencent.bugly.crashreport.common.strategy.a g;
|
||||
private final s h;
|
||||
private final u i;
|
||||
private final int j;
|
||||
private final t k;
|
||||
private final t l;
|
||||
private String m;
|
||||
private final String n;
|
||||
private final Map<String, String> o;
|
||||
private int p;
|
||||
private long q;
|
||||
private long r;
|
||||
private boolean s;
|
||||
private boolean t;
|
||||
|
||||
public v(Context context, int i, int i2, byte[] bArr, String str, String str2, t tVar, boolean z, boolean z2) {
|
||||
this(context, i, i2, bArr, str, str2, tVar, z, 2, BuglyStrategy.a.MAX_USERDATA_VALUE_LENGTH, z2, null);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:12:0x0020 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0052 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:18:0x006b */
|
||||
/* JADX WARN: Removed duplicated region for block: B:21:0x0072 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:24:? A[RETURN, SYNTHETIC] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:25:0x002a */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
private void a(com.tencent.bugly.proguard.aq r4, boolean r5, int r6, java.lang.String r7, int r8) {
|
||||
/*
|
||||
r3 = this;
|
||||
int r4 = r3.d
|
||||
r0 = 630(0x276, float:8.83E-43)
|
||||
if (r4 == r0) goto L1a
|
||||
r0 = 640(0x280, float:8.97E-43)
|
||||
if (r4 == r0) goto L17
|
||||
r0 = 830(0x33e, float:1.163E-42)
|
||||
if (r4 == r0) goto L1a
|
||||
r0 = 840(0x348, float:1.177E-42)
|
||||
if (r4 == r0) goto L17
|
||||
java.lang.String r4 = java.lang.String.valueOf(r4)
|
||||
goto L1c
|
||||
L17:
|
||||
java.lang.String r4 = "userinfo"
|
||||
goto L1c
|
||||
L1a:
|
||||
java.lang.String r4 = "crash"
|
||||
L1c:
|
||||
r0 = 1
|
||||
r1 = 0
|
||||
if (r5 == 0) goto L2a
|
||||
java.lang.Object[] r6 = new java.lang.Object[r0]
|
||||
r6[r1] = r4
|
||||
java.lang.String r4 = "[Upload] Success: %s"
|
||||
com.tencent.bugly.proguard.x.a(r4, r6)
|
||||
goto L47
|
||||
L2a:
|
||||
r2 = 3
|
||||
java.lang.Object[] r2 = new java.lang.Object[r2]
|
||||
java.lang.Integer r6 = java.lang.Integer.valueOf(r6)
|
||||
r2[r1] = r6
|
||||
r2[r0] = r4
|
||||
r4 = 2
|
||||
r2[r4] = r7
|
||||
java.lang.String r4 = "[Upload] Failed to upload(%d) %s: %s"
|
||||
com.tencent.bugly.proguard.x.e(r4, r2)
|
||||
boolean r4 = r3.s
|
||||
if (r4 == 0) goto L47
|
||||
com.tencent.bugly.proguard.u r4 = r3.i
|
||||
r6 = 0
|
||||
r4.a(r8, r6)
|
||||
L47:
|
||||
long r6 = r3.q
|
||||
long r0 = r3.r
|
||||
long r6 = r6 + r0
|
||||
r0 = 0
|
||||
int r4 = (r6 > r0 ? 1 : (r6 == r0 ? 0 : -1))
|
||||
if (r4 <= 0) goto L67
|
||||
com.tencent.bugly.proguard.u r4 = r3.i
|
||||
boolean r6 = r3.t
|
||||
long r6 = r4.a(r6)
|
||||
long r0 = r3.q
|
||||
long r6 = r6 + r0
|
||||
long r0 = r3.r
|
||||
long r6 = r6 + r0
|
||||
com.tencent.bugly.proguard.u r4 = r3.i
|
||||
boolean r8 = r3.t
|
||||
r4.a(r6, r8)
|
||||
L67:
|
||||
com.tencent.bugly.proguard.t r4 = r3.k
|
||||
if (r4 == 0) goto L6e
|
||||
r4.a(r5)
|
||||
L6e:
|
||||
com.tencent.bugly.proguard.t r4 = r3.l
|
||||
if (r4 == 0) goto L75
|
||||
r4.a(r5)
|
||||
L75:
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.v.a(com.tencent.bugly.proguard.aq, boolean, int, java.lang.String, int):void");
|
||||
}
|
||||
|
||||
public final void b(long j) {
|
||||
this.r += j;
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:70:0x01fc A[Catch: all -> 0x0430, TryCatch #0 {all -> 0x0430, blocks: (B:3:0x0007, B:5:0x0019, B:9:0x0027, B:12:0x002c, B:14:0x0040, B:16:0x0044, B:18:0x0048, B:21:0x004e, B:23:0x0056, B:25:0x0062, B:27:0x0088, B:28:0x008d, B:30:0x0092, B:32:0x00c5, B:34:0x00d1, B:36:0x00d7, B:38:0x00e3, B:40:0x00eb, B:42:0x00f7, B:43:0x010d, B:46:0x0115, B:48:0x012c, B:49:0x0139, B:51:0x014b, B:52:0x0150, B:148:0x0181, B:56:0x0196, B:60:0x01a2, B:63:0x01a9, B:66:0x01b1, B:70:0x01fc, B:72:0x0228, B:73:0x0230, B:75:0x0236, B:77:0x0257, B:91:0x0294, B:93:0x029f, B:94:0x02b4, B:96:0x02f6, B:98:0x033e, B:100:0x0350, B:102:0x0353, B:103:0x035b, B:105:0x0361, B:107:0x037c, B:109:0x0388, B:111:0x0390, B:113:0x039c, B:115:0x03a3, B:117:0x03af, B:119:0x03b7, B:121:0x03c3, B:123:0x03c7, B:124:0x03cc, B:127:0x03e1, B:129:0x03f4, B:131:0x0400, B:133:0x03de, B:135:0x0314, B:137:0x01bb, B:139:0x01c1, B:140:0x01c9, B:142:0x01d7, B:143:0x01e3, B:144:0x01f0, B:151:0x040c, B:153:0x0418, B:155:0x0424), top: B:2:0x0007 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:82:0x0263 A[EXC_TOP_SPLITTER, SYNTHETIC] */
|
||||
@Override // java.lang.Runnable
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public final void run() {
|
||||
/*
|
||||
Method dump skipped, instructions count: 1083
|
||||
To view this dump change 'Code comments level' option to 'DEBUG'
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.proguard.v.run():void");
|
||||
}
|
||||
|
||||
public v(Context context, int i, int i2, byte[] bArr, String str, String str2, t tVar, boolean z, int i3, int i4, boolean z2, Map<String, String> map) {
|
||||
this.a = 2;
|
||||
this.b = BuglyStrategy.a.MAX_USERDATA_VALUE_LENGTH;
|
||||
this.m = null;
|
||||
this.p = 0;
|
||||
this.q = 0L;
|
||||
this.r = 0L;
|
||||
this.s = true;
|
||||
this.t = false;
|
||||
this.c = context;
|
||||
this.f = com.tencent.bugly.crashreport.common.info.a.a(context);
|
||||
this.e = bArr;
|
||||
this.g = com.tencent.bugly.crashreport.common.strategy.a.a();
|
||||
this.h = s.a(context);
|
||||
this.i = u.a();
|
||||
this.j = i;
|
||||
this.m = str;
|
||||
this.n = str2;
|
||||
this.k = tVar;
|
||||
this.l = null;
|
||||
this.s = z;
|
||||
this.d = i2;
|
||||
if (i3 > 0) {
|
||||
this.a = i3;
|
||||
}
|
||||
if (i4 > 0) {
|
||||
this.b = i4;
|
||||
}
|
||||
this.t = z2;
|
||||
this.o = map;
|
||||
}
|
||||
|
||||
private static boolean a(aq aqVar, com.tencent.bugly.crashreport.common.info.a aVar, com.tencent.bugly.crashreport.common.strategy.a aVar2) {
|
||||
if (aqVar == null) {
|
||||
x.d("resp == null!", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
byte b = aqVar.a;
|
||||
if (b != 0) {
|
||||
x.e("resp result error %d", Byte.valueOf(b));
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
if (!z.a(aqVar.d) && !com.tencent.bugly.crashreport.common.info.a.b().i().equals(aqVar.d)) {
|
||||
p.a().a(com.tencent.bugly.crashreport.common.strategy.a.a, "gateway", aqVar.d.getBytes("UTF-8"), (o) null, true);
|
||||
aVar.d(aqVar.d);
|
||||
}
|
||||
if (!z.a(aqVar.f) && !com.tencent.bugly.crashreport.common.info.a.b().j().equals(aqVar.f)) {
|
||||
p.a().a(com.tencent.bugly.crashreport.common.strategy.a.a, "device", aqVar.f.getBytes("UTF-8"), (o) null, true);
|
||||
aVar.e(aqVar.f);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
x.a(th);
|
||||
}
|
||||
aVar.i = aqVar.e;
|
||||
int i = aqVar.b;
|
||||
if (i == 510) {
|
||||
byte[] bArr = aqVar.c;
|
||||
if (bArr == null) {
|
||||
x.e("[Upload] Strategy data is null. Response cmd: %d", Integer.valueOf(i));
|
||||
return false;
|
||||
}
|
||||
as asVar = (as) a.a(bArr, as.class);
|
||||
if (asVar == null) {
|
||||
x.e("[Upload] Failed to decode strategy from server. Response cmd: %d", Integer.valueOf(aqVar.b));
|
||||
return false;
|
||||
}
|
||||
aVar2.a(asVar);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public final void a(long j) {
|
||||
this.p++;
|
||||
this.q += j;
|
||||
}
|
||||
|
||||
private static String a(String str) {
|
||||
if (z.a(str)) {
|
||||
return str;
|
||||
}
|
||||
try {
|
||||
return String.format("%s?aid=%s", str, UUID.randomUUID().toString());
|
||||
} catch (Throwable th) {
|
||||
x.a(th);
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
102
sources/com/tencent/bugly/proguard/w.java
Normal file
102
sources/com/tencent/bugly/proguard/w.java
Normal file
@@ -0,0 +1,102 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class w {
|
||||
private static final AtomicInteger a = new AtomicInteger(1);
|
||||
private static w b;
|
||||
private ScheduledExecutorService c;
|
||||
|
||||
protected w() {
|
||||
this.c = null;
|
||||
this.c = Executors.newScheduledThreadPool(3, new ThreadFactory(this) { // from class: com.tencent.bugly.proguard.w.1
|
||||
@Override // java.util.concurrent.ThreadFactory
|
||||
public final Thread newThread(Runnable runnable) {
|
||||
Thread thread = new Thread(runnable);
|
||||
thread.setName("BuglyThread-" + w.a.getAndIncrement());
|
||||
return thread;
|
||||
}
|
||||
});
|
||||
ScheduledExecutorService scheduledExecutorService = this.c;
|
||||
if (scheduledExecutorService == null || scheduledExecutorService.isShutdown()) {
|
||||
x.d("[AsyncTaskHandler] ScheduledExecutorService is not valiable!", new Object[0]);
|
||||
}
|
||||
}
|
||||
|
||||
public static synchronized w a() {
|
||||
w wVar;
|
||||
synchronized (w.class) {
|
||||
if (b == null) {
|
||||
b = new w();
|
||||
}
|
||||
wVar = b;
|
||||
}
|
||||
return wVar;
|
||||
}
|
||||
|
||||
public final synchronized void b() {
|
||||
if (this.c != null && !this.c.isShutdown()) {
|
||||
x.c("[AsyncTaskHandler] Close async handler.", new Object[0]);
|
||||
this.c.shutdownNow();
|
||||
}
|
||||
}
|
||||
|
||||
public final synchronized boolean c() {
|
||||
boolean z;
|
||||
if (this.c != null) {
|
||||
z = this.c.isShutdown() ? false : true;
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
public final synchronized boolean a(Runnable runnable, long j) {
|
||||
if (!c()) {
|
||||
x.d("[AsyncTaskHandler] Async handler was closed, should not post task.", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
if (runnable == null) {
|
||||
x.d("[AsyncTaskHandler] Task input is null.", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
if (j <= 0) {
|
||||
j = 0;
|
||||
}
|
||||
x.c("[AsyncTaskHandler] Post a delay(time: %dms) task: %s", Long.valueOf(j), runnable.getClass().getName());
|
||||
try {
|
||||
this.c.schedule(runnable, j, TimeUnit.MILLISECONDS);
|
||||
return true;
|
||||
} catch (Throwable th) {
|
||||
if (com.tencent.bugly.b.c) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public final synchronized boolean a(Runnable runnable) {
|
||||
if (!c()) {
|
||||
x.d("[AsyncTaskHandler] Async handler was closed, should not post task.", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
if (runnable == null) {
|
||||
x.d("[AsyncTaskHandler] Task input is null.", new Object[0]);
|
||||
return false;
|
||||
}
|
||||
x.c("[AsyncTaskHandler] Post a normal task: %s", runnable.getClass().getName());
|
||||
try {
|
||||
this.c.execute(runnable);
|
||||
return true;
|
||||
} catch (Throwable th) {
|
||||
if (com.tencent.bugly.b.c) {
|
||||
th.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
86
sources/com/tencent/bugly/proguard/x.java
Normal file
86
sources/com/tencent/bugly/proguard/x.java
Normal file
@@ -0,0 +1,86 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.util.Log;
|
||||
import java.util.Locale;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class x {
|
||||
public static String a = "CrashReport";
|
||||
public static boolean b = false;
|
||||
private static String c = "CrashReportInfo";
|
||||
|
||||
private static boolean a(int i, String str, Object... objArr) {
|
||||
if (!b) {
|
||||
return false;
|
||||
}
|
||||
if (str == null) {
|
||||
str = "null";
|
||||
} else if (objArr != null && objArr.length != 0) {
|
||||
str = String.format(Locale.US, str, objArr);
|
||||
}
|
||||
if (i == 0) {
|
||||
Log.i(a, str);
|
||||
return true;
|
||||
}
|
||||
if (i == 1) {
|
||||
Log.d(a, str);
|
||||
return true;
|
||||
}
|
||||
if (i == 2) {
|
||||
Log.w(a, str);
|
||||
return true;
|
||||
}
|
||||
if (i == 3) {
|
||||
Log.e(a, str);
|
||||
return true;
|
||||
}
|
||||
if (i != 5) {
|
||||
return false;
|
||||
}
|
||||
Log.i(c, str);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean b(String str, Object... objArr) {
|
||||
return a(5, str, objArr);
|
||||
}
|
||||
|
||||
public static boolean c(String str, Object... objArr) {
|
||||
return a(1, str, objArr);
|
||||
}
|
||||
|
||||
public static boolean d(String str, Object... objArr) {
|
||||
return a(2, str, objArr);
|
||||
}
|
||||
|
||||
public static boolean e(String str, Object... objArr) {
|
||||
return a(3, str, objArr);
|
||||
}
|
||||
|
||||
public static boolean b(Class cls, String str, Object... objArr) {
|
||||
return a(1, String.format(Locale.US, "[%s] %s", cls.getSimpleName(), str), objArr);
|
||||
}
|
||||
|
||||
public static boolean b(Throwable th) {
|
||||
if (b) {
|
||||
return a(3, z.a(th), new Object[0]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean a(String str, Object... objArr) {
|
||||
return a(0, str, objArr);
|
||||
}
|
||||
|
||||
public static boolean a(Class cls, String str, Object... objArr) {
|
||||
return a(0, String.format(Locale.US, "[%s] %s", cls.getSimpleName(), str), objArr);
|
||||
}
|
||||
|
||||
public static boolean a(Throwable th) {
|
||||
if (b) {
|
||||
return a(2, z.a(th), new Object[0]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
304
sources/com/tencent/bugly/proguard/y.java
Normal file
304
sources/com/tencent/bugly/proguard/y.java
Normal file
@@ -0,0 +1,304 @@
|
||||
package com.tencent.bugly.proguard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Process;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
/* loaded from: classes.dex */
|
||||
public final class y {
|
||||
public static boolean a = true;
|
||||
private static SimpleDateFormat b = null;
|
||||
private static int c = 5120;
|
||||
private static StringBuilder d = null;
|
||||
private static StringBuilder e = null;
|
||||
private static boolean f = false;
|
||||
private static a g = null;
|
||||
private static String h = null;
|
||||
private static String i = null;
|
||||
private static Context j = null;
|
||||
private static String k = null;
|
||||
private static boolean l = false;
|
||||
private static boolean m = false;
|
||||
private static ExecutorService n;
|
||||
private static int o;
|
||||
private static final Object p = new Object();
|
||||
|
||||
/* compiled from: BUGLY */
|
||||
public static class a {
|
||||
private boolean a;
|
||||
private File b;
|
||||
private String c;
|
||||
private long d;
|
||||
private long e = 30720;
|
||||
|
||||
public a(String str) {
|
||||
if (str == null || str.equals("")) {
|
||||
return;
|
||||
}
|
||||
this.c = str;
|
||||
this.a = a();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public boolean a() {
|
||||
try {
|
||||
this.b = new File(this.c);
|
||||
if (this.b.exists() && !this.b.delete()) {
|
||||
this.a = false;
|
||||
return false;
|
||||
}
|
||||
if (this.b.createNewFile()) {
|
||||
return true;
|
||||
}
|
||||
this.a = false;
|
||||
return false;
|
||||
} catch (Throwable th) {
|
||||
x.a(th);
|
||||
this.a = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean a(String str) {
|
||||
FileOutputStream fileOutputStream;
|
||||
if (!this.a) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
fileOutputStream = new FileOutputStream(this.b, true);
|
||||
} catch (Throwable th) {
|
||||
th = th;
|
||||
fileOutputStream = null;
|
||||
}
|
||||
try {
|
||||
fileOutputStream.write(str.getBytes("UTF-8"));
|
||||
fileOutputStream.flush();
|
||||
fileOutputStream.close();
|
||||
this.d += r10.length;
|
||||
this.a = true;
|
||||
try {
|
||||
fileOutputStream.close();
|
||||
} catch (IOException unused) {
|
||||
}
|
||||
return true;
|
||||
} catch (Throwable th2) {
|
||||
th = th2;
|
||||
try {
|
||||
x.a(th);
|
||||
this.a = false;
|
||||
if (fileOutputStream != null) {
|
||||
try {
|
||||
fileOutputStream.close();
|
||||
} catch (IOException unused2) {
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} catch (Throwable th3) {
|
||||
if (fileOutputStream != null) {
|
||||
try {
|
||||
fileOutputStream.close();
|
||||
} catch (IOException unused3) {
|
||||
}
|
||||
}
|
||||
throw th3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
try {
|
||||
b = new SimpleDateFormat("MM-dd HH:mm:ss");
|
||||
} catch (Throwable unused) {
|
||||
}
|
||||
}
|
||||
|
||||
public static synchronized void a(Context context) {
|
||||
synchronized (y.class) {
|
||||
if (l || context == null || !a) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
n = Executors.newSingleThreadExecutor();
|
||||
e = new StringBuilder(0);
|
||||
d = new StringBuilder(0);
|
||||
j = context;
|
||||
com.tencent.bugly.crashreport.common.info.a a2 = com.tencent.bugly.crashreport.common.info.a.a(context);
|
||||
h = a2.d;
|
||||
a2.getClass();
|
||||
i = "";
|
||||
k = j.getFilesDir().getPath() + "/buglylog_" + h + "_" + i + ".txt";
|
||||
o = Process.myPid();
|
||||
} catch (Throwable unused) {
|
||||
}
|
||||
l = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static boolean d(String str, String str2, String str3) {
|
||||
try {
|
||||
com.tencent.bugly.crashreport.common.info.a b2 = com.tencent.bugly.crashreport.common.info.a.b();
|
||||
if (b2 == null || b2.D == null) {
|
||||
return false;
|
||||
}
|
||||
return b2.D.appendLogToNative(str, str2, str3);
|
||||
} catch (Throwable th) {
|
||||
if (x.a(th)) {
|
||||
return false;
|
||||
}
|
||||
th.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static synchronized void e(String str, String str2, String str3) {
|
||||
synchronized (y.class) {
|
||||
long myTid = Process.myTid();
|
||||
d.setLength(0);
|
||||
if (str3.length() > 30720) {
|
||||
str3 = str3.substring(str3.length() - 30720, str3.length() - 1);
|
||||
}
|
||||
Date date = new Date();
|
||||
String format = b != null ? b.format(date) : date.toString();
|
||||
StringBuilder sb = d;
|
||||
sb.append(format);
|
||||
sb.append(" ");
|
||||
sb.append(o);
|
||||
sb.append(" ");
|
||||
sb.append(myTid);
|
||||
sb.append(" ");
|
||||
sb.append(str);
|
||||
sb.append(" ");
|
||||
sb.append(str2);
|
||||
sb.append(": ");
|
||||
sb.append(str3);
|
||||
sb.append("\u0001\r\n");
|
||||
String sb2 = d.toString();
|
||||
synchronized (p) {
|
||||
try {
|
||||
e.append(sb2);
|
||||
} catch (Throwable unused) {
|
||||
}
|
||||
if (e.length() <= c) {
|
||||
return;
|
||||
}
|
||||
if (f) {
|
||||
return;
|
||||
}
|
||||
f = true;
|
||||
if (g == null) {
|
||||
g = new a(k);
|
||||
} else if (g.b == null || g.b.length() + e.length() > g.e) {
|
||||
g.a();
|
||||
}
|
||||
if (g.a(e.toString())) {
|
||||
e.setLength(0);
|
||||
f = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String b() {
|
||||
try {
|
||||
com.tencent.bugly.crashreport.common.info.a b2 = com.tencent.bugly.crashreport.common.info.a.b();
|
||||
if (b2 == null || b2.D == null) {
|
||||
return null;
|
||||
}
|
||||
return b2.D.getLogFromNative();
|
||||
} catch (Throwable th) {
|
||||
if (x.a(th)) {
|
||||
return null;
|
||||
}
|
||||
th.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void a(int i2) {
|
||||
synchronized (p) {
|
||||
c = i2;
|
||||
if (i2 < 0) {
|
||||
c = 0;
|
||||
} else if (i2 > 10240) {
|
||||
c = 10240;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void a(boolean z) {
|
||||
x.a("[LogUtil] Whether can record user log into native: " + z, new Object[0]);
|
||||
m = z;
|
||||
}
|
||||
|
||||
public static void a(String str, String str2, Throwable th) {
|
||||
if (th == null) {
|
||||
return;
|
||||
}
|
||||
String message = th.getMessage();
|
||||
if (message == null) {
|
||||
message = "";
|
||||
}
|
||||
a(str, str2, message + '\n' + z.b(th));
|
||||
}
|
||||
|
||||
public static synchronized void a(final String str, final String str2, final String str3) {
|
||||
synchronized (y.class) {
|
||||
if (l && a) {
|
||||
try {
|
||||
} catch (Exception e2) {
|
||||
x.b(e2);
|
||||
}
|
||||
if (m) {
|
||||
n.execute(new Runnable() { // from class: com.tencent.bugly.proguard.y.1
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
if (y.d(str, str2, str3)) {
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
n.execute(new Runnable() { // from class: com.tencent.bugly.proguard.y.2
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
y.e(str, str2, str3);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] a() {
|
||||
if (!a) {
|
||||
return null;
|
||||
}
|
||||
if (m) {
|
||||
x.a("[LogUtil] Get user log from native.", new Object[0]);
|
||||
String b2 = b();
|
||||
if (b2 != null) {
|
||||
x.a("[LogUtil] Got user log from native: %d bytes", Integer.valueOf(b2.length()));
|
||||
return z.a((File) null, b2, "BuglyNativeLog.txt");
|
||||
}
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
synchronized (p) {
|
||||
if (g != null && g.a && g.b != null && g.b.length() > 0) {
|
||||
sb.append(z.a(g.b, 30720, true));
|
||||
}
|
||||
if (e != null && e.length() > 0) {
|
||||
sb.append(e.toString());
|
||||
}
|
||||
}
|
||||
return z.a((File) null, sb.toString(), "BuglyLog.txt");
|
||||
}
|
||||
}
|
1120
sources/com/tencent/bugly/proguard/z.java
Normal file
1120
sources/com/tencent/bugly/proguard/z.java
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user