Initial commit

This commit is contained in:
2025-05-13 19:24:51 +02:00
commit a950f49678
10604 changed files with 932663 additions and 0 deletions

View File

@@ -0,0 +1,169 @@
package com.tencent.open.b;
import android.content.Context;
import android.database.Cursor;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import com.ijm.dataencryption.de.DataDecryptTool;
import com.ubt.jimu.transport.model.TransportFile;
import com.ubtrobot.jimu.robotapi.PeripheralType;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class a {
protected static final Uri a = Uri.parse("content://telephony/carriers/preferapn");
public static String a(Context context) {
int d = d(context);
if (d == 2) {
return "wifi";
}
if (d == 1) {
return "cmwap";
}
if (d == 4) {
return "cmnet";
}
if (d == 16) {
return "uniwap";
}
if (d == 8) {
return "uninet";
}
if (d == 64) {
return "wap";
}
if (d == 32) {
return "net";
}
if (d == 512) {
return "ctwap";
}
if (d == 256) {
return "ctnet";
}
if (d == 2048) {
return "3gnet";
}
if (d == 1024) {
return "3gwap";
}
String b = b(context);
return (b == null || b.length() == 0) ? TransportFile.TYPE_NONE : b;
}
public static String b(Context context) {
try {
Cursor query = context.getContentResolver().query(a, null, null, null, null);
if (query == null) {
return null;
}
query.moveToFirst();
if (query.isAfterLast()) {
if (query != null) {
query.close();
}
return null;
}
String string = query.getString(query.getColumnIndex("apn"));
if (query != null) {
query.close();
}
return string;
} catch (SecurityException e) {
com.tencent.open.a.f.e("openSDK_LOG.APNUtil", "getApn has exception: " + e.getMessage());
return "";
} catch (Exception e2) {
com.tencent.open.a.f.e("openSDK_LOG.APNUtil", "getApn has exception: " + e2.getMessage());
return "";
}
}
public static String c(Context context) {
try {
Cursor query = context.getContentResolver().query(a, null, null, null, null);
if (query == null) {
return null;
}
query.moveToFirst();
if (query.isAfterLast()) {
if (query != null) {
query.close();
}
return null;
}
String string = query.getString(query.getColumnIndex("proxy"));
if (query != null) {
query.close();
}
return string;
} catch (SecurityException e) {
com.tencent.open.a.f.e("openSDK_LOG.APNUtil", "getApnProxy has exception: " + e.getMessage());
return "";
}
}
public static int d(Context context) {
ConnectivityManager connectivityManager;
NetworkInfo activeNetworkInfo;
try {
connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
} catch (Exception e) {
com.tencent.open.a.f.e("openSDK_LOG.APNUtil", "getMProxyType has exception: " + e.getMessage());
}
if (connectivityManager == null || (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) == null) {
return PeripheralType.SERVO;
}
if (activeNetworkInfo.getTypeName().toUpperCase().equals("WIFI")) {
return 2;
}
String lowerCase = activeNetworkInfo.getExtraInfo().toLowerCase();
if (lowerCase.startsWith("cmwap")) {
return 1;
}
if (!lowerCase.startsWith("cmnet") && !lowerCase.startsWith("epc.tmobile.com")) {
if (lowerCase.startsWith("uniwap")) {
return 16;
}
if (lowerCase.startsWith("uninet")) {
return 8;
}
if (lowerCase.startsWith("wap")) {
return 64;
}
if (lowerCase.startsWith("net")) {
return 32;
}
if (lowerCase.startsWith("ctwap")) {
return DataDecryptTool.DECRYPT_DB_FILE;
}
if (lowerCase.startsWith("ctnet")) {
return DataDecryptTool.DECRYPT_ALL_FILE;
}
if (lowerCase.startsWith("3gwap")) {
return DataDecryptTool.DECRYPT_SP_FILE;
}
if (lowerCase.startsWith("3gnet")) {
return 2048;
}
if (lowerCase.startsWith("#777")) {
String c = c(context);
if (c != null) {
if (c.length() > 0) {
return DataDecryptTool.DECRYPT_DB_FILE;
}
}
return DataDecryptTool.DECRYPT_ALL_FILE;
}
return PeripheralType.SERVO;
}
return 4;
}
public static String e(Context context) {
NetworkInfo activeNetworkInfo;
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
return (connectivityManager == null || (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) == null) ? "MOBILE" : activeNetworkInfo.getTypeName();
}
}

View File

@@ -0,0 +1,19 @@
package com.tencent.open.b;
import android.os.Bundle;
import java.io.Serializable;
import java.util.HashMap;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class b implements Serializable {
public final HashMap<String, String> a = new HashMap<>();
public b(Bundle bundle) {
if (bundle != null) {
for (String str : bundle.keySet()) {
this.a.put(str, bundle.getString(str));
}
}
}
}

View File

@@ -0,0 +1,149 @@
package com.tencent.open.b;
import android.content.Context;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Environment;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.WindowManager;
import java.util.Locale;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class c {
static String a;
static String b;
static String c;
private static String d;
private static String e;
public static String a() {
WifiManager wifiManager;
WifiInfo connectionInfo;
try {
Context a2 = com.tencent.open.utils.d.a();
return (a2 == null || (wifiManager = (WifiManager) a2.getSystemService("wifi")) == null || (connectionInfo = wifiManager.getConnectionInfo()) == null) ? "" : connectionInfo.getMacAddress();
} catch (SecurityException e2) {
com.tencent.open.a.f.b("openSDK_LOG.MobileInfoUtil", "getLocalMacAddress>>>", e2);
return "";
}
}
public static String b() {
return Locale.getDefault().getLanguage();
}
public static String c(Context context) {
String str = b;
if (str != null && str.length() > 0) {
return b;
}
if (context == null) {
return "";
}
try {
b = ((TelephonyManager) context.getSystemService("phone")).getSimSerialNumber();
return b;
} catch (Exception unused) {
return "";
}
}
public static String d(Context context) {
String str = c;
if (str != null && str.length() > 0) {
return c;
}
if (context == null) {
return "";
}
try {
c = Settings.Secure.getString(context.getContentResolver(), "android_id");
return c;
} catch (Exception unused) {
return "";
}
}
public static String e(Context context) {
try {
if (e == null) {
WindowManager windowManager = (WindowManager) context.getSystemService("window");
DisplayMetrics displayMetrics = new DisplayMetrics();
windowManager.getDefaultDisplay().getMetrics(displayMetrics);
StringBuilder sb = new StringBuilder();
sb.append("imei=");
sb.append(b(context));
sb.append('&');
sb.append("model=");
sb.append(Build.MODEL);
sb.append('&');
sb.append("os=");
sb.append(Build.VERSION.RELEASE);
sb.append('&');
sb.append("apilevel=");
sb.append(Build.VERSION.SDK_INT);
sb.append('&');
String b2 = a.b(context);
if (b2 == null) {
b2 = "";
}
sb.append("network=");
sb.append(b2);
sb.append('&');
sb.append("sdcard=");
sb.append(Environment.getExternalStorageState().equals("mounted") ? 1 : 0);
sb.append('&');
sb.append("display=");
sb.append(displayMetrics.widthPixels);
sb.append('*');
sb.append(displayMetrics.heightPixels);
sb.append('&');
sb.append("manu=");
sb.append(Build.MANUFACTURER);
sb.append("&");
sb.append("wifi=");
sb.append(a.e(context));
e = sb.toString();
}
return e;
} catch (Exception unused) {
return null;
}
}
public static String b(Context context) {
String str = a;
if (str != null && str.length() > 0) {
return a;
}
if (context == null) {
return "";
}
try {
a = ((TelephonyManager) context.getSystemService("phone")).getDeviceId();
return a;
} catch (Exception unused) {
return "";
}
}
public static String a(Context context) {
if (!TextUtils.isEmpty(d)) {
return d;
}
if (context == null) {
return "";
}
d = "";
WindowManager windowManager = (WindowManager) context.getSystemService("window");
if (windowManager != null) {
d = windowManager.getDefaultDisplay().getWidth() + "x" + windowManager.getDefaultDisplay().getHeight();
}
return d;
}
}

View File

@@ -0,0 +1,56 @@
package com.tencent.open.b;
import android.os.SystemClock;
import com.tencent.open.utils.i;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class d {
protected static d a;
protected d() {
}
public static synchronized d a() {
d dVar;
synchronized (d.class) {
if (a == null) {
a = new d();
}
dVar = a;
}
return dVar;
}
public void a(String str, String str2, String str3, String str4, String str5, String str6) {
g.a().a(i.a(str, str3, str4, str5, str2, str6), str2, true);
}
public void a(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8) {
g.a().a(i.a(str, str4, str5, str3, str2, str6, "", str7, str8, "", "", ""), str2, false);
}
public void a(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, String str9, String str10) {
g.a().a(i.a(str, str4, str5, str3, str2, str6, str7, "", "", str8, str9, str10), str2, false);
}
public void a(int i, String str, String str2, String str3, String str4, Long l, int i2, int i3, String str5) {
long elapsedRealtime = SystemClock.elapsedRealtime() - l.longValue();
if (l.longValue() == 0 || elapsedRealtime < 0) {
elapsedRealtime = 0;
}
StringBuffer stringBuffer = new StringBuffer("http://c.isdspeed.qq.com/code.cgi");
stringBuffer.append("?domain=mobile.opensdk.com&cgi=opensdk&type=");
stringBuffer.append(i);
stringBuffer.append("&code=");
stringBuffer.append(i2);
stringBuffer.append("&time=");
stringBuffer.append(elapsedRealtime);
stringBuffer.append("&rate=");
stringBuffer.append(i3);
stringBuffer.append("&uin=");
stringBuffer.append(str2);
stringBuffer.append("&data=");
g.a().a(stringBuffer.toString(), "GET", i.a(String.valueOf(i), String.valueOf(i2), String.valueOf(elapsedRealtime), String.valueOf(i3), str, str2, str3, str4, str5), true);
}
}

View File

@@ -0,0 +1,21 @@
package com.tencent.open.b;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class e {
public static int a(String str) {
int a;
if (com.tencent.open.utils.d.a() == null || (a = com.tencent.open.utils.e.a(com.tencent.open.utils.d.a(), str).a("Common_BusinessReportFrequency")) == 0) {
return 100;
}
return a;
}
public static int a() {
int a = com.tencent.open.utils.e.a(com.tencent.open.utils.d.a(), (String) null).a("Common_HttpRetryCount");
if (a == 0) {
return 2;
}
return a;
}
}

View File

@@ -0,0 +1,373 @@
package com.tencent.open.b;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class f extends SQLiteOpenHelper {
protected static final String[] a = {"key"};
protected static f b;
public f(Context context) {
super(context, "sdk_report.db", (SQLiteDatabase.CursorFactory) null, 2);
}
public static synchronized f a() {
f fVar;
synchronized (f.class) {
if (b == null) {
b = new f(com.tencent.open.utils.d.a());
}
fVar = b;
}
return fVar;
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x0032, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:22:0x002e, code lost:
if (r0 == null) goto L21;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public synchronized void b(java.lang.String r6) {
/*
r5 = this;
monitor-enter(r5)
boolean r0 = android.text.TextUtils.isEmpty(r6) // Catch: java.lang.Throwable -> L39
if (r0 == 0) goto L9
monitor-exit(r5)
return
L9:
android.database.sqlite.SQLiteDatabase r0 = r5.getWritableDatabase() // Catch: java.lang.Throwable -> L39
if (r0 != 0) goto L11
monitor-exit(r5)
return
L11:
java.lang.String r1 = "via_cgi_report"
java.lang.String r2 = "type = ?"
r3 = 1
java.lang.String[] r3 = new java.lang.String[r3] // Catch: java.lang.Throwable -> L24 java.lang.Exception -> L26
r4 = 0
r3[r4] = r6 // Catch: java.lang.Throwable -> L24 java.lang.Exception -> L26
r0.delete(r1, r2, r3) // Catch: java.lang.Throwable -> L24 java.lang.Exception -> L26
if (r0 == 0) goto L31
L20:
r0.close() // Catch: java.lang.Throwable -> L39
goto L31
L24:
r6 = move-exception
goto L33
L26:
r6 = move-exception
java.lang.String r1 = "openSDK_LOG.ReportDatabaseHelper"
java.lang.String r2 = "clearReportItem has exception."
com.tencent.open.a.f.b(r1, r2, r6) // Catch: java.lang.Throwable -> L24
if (r0 == 0) goto L31
goto L20
L31:
monitor-exit(r5)
return
L33:
if (r0 == 0) goto L38
r0.close() // Catch: java.lang.Throwable -> L39
L38:
throw r6 // Catch: java.lang.Throwable -> L39
L39:
r6 = move-exception
monitor-exit(r5)
throw r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.tencent.open.b.f.b(java.lang.String):void");
}
@Override // android.database.sqlite.SQLiteOpenHelper
public void onCreate(SQLiteDatabase sQLiteDatabase) {
sQLiteDatabase.execSQL("CREATE TABLE IF NOT EXISTS via_cgi_report( _id INTEGER PRIMARY KEY,key TEXT,type TEXT,blob BLOB);");
}
@Override // android.database.sqlite.SQLiteOpenHelper
public void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) {
sQLiteDatabase.execSQL("DROP TABLE IF EXISTS via_cgi_report");
onCreate(sQLiteDatabase);
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x0089, code lost:
if (r1 != null) goto L49;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x008b, code lost:
r1.close();
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x00a3, code lost:
return r0;
*/
/* JADX WARN: Code restructure failed: missing block: B:79:0x009f, code lost:
if (r1 != null) goto L49;
*/
/* JADX WARN: Removed duplicated region for block: B:36:0x0075 A[Catch: all -> 0x007f, Exception -> 0x0081, TRY_ENTER, TryCatch #13 {Exception -> 0x0081, all -> 0x007f, blocks: (B:23:0x0030, B:25:0x0036, B:26:0x0039, B:32:0x0053, B:34:0x0056, B:36:0x0075, B:37:0x0078, B:67:0x0062, B:60:0x0065, B:61:0x0068, B:54:0x006c, B:49:0x006f), top: B:22:0x0030 }] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public synchronized java.util.List<java.io.Serializable> a(java.lang.String r12) {
/*
r11 = this;
monitor-enter(r11)
java.util.ArrayList r0 = new java.util.ArrayList // Catch: java.lang.Throwable -> Laf
r0.<init>() // Catch: java.lang.Throwable -> Laf
java.util.List r0 = java.util.Collections.synchronizedList(r0) // Catch: java.lang.Throwable -> Laf
boolean r1 = android.text.TextUtils.isEmpty(r12) // Catch: java.lang.Throwable -> Laf
if (r1 == 0) goto L12
monitor-exit(r11)
return r0
L12:
android.database.sqlite.SQLiteDatabase r1 = r11.getReadableDatabase() // Catch: java.lang.Throwable -> Laf
if (r1 != 0) goto L1a
monitor-exit(r11)
return r0
L1a:
r10 = 0
java.lang.String r3 = "via_cgi_report"
r4 = 0
java.lang.String r5 = "type = ?"
r2 = 1
java.lang.String[] r6 = new java.lang.String[r2] // Catch: java.lang.Throwable -> L8f java.lang.Exception -> L92
r2 = 0
r6[r2] = r12 // Catch: java.lang.Throwable -> L8f java.lang.Exception -> L92
r7 = 0
r8 = 0
r9 = 0
r2 = r1
android.database.Cursor r12 = r2.query(r3, r4, r5, r6, r7, r8, r9) // Catch: java.lang.Throwable -> L8f java.lang.Exception -> L92
if (r12 == 0) goto L84
int r2 = r12.getCount() // Catch: java.lang.Throwable -> L7f java.lang.Exception -> L81
if (r2 <= 0) goto L84
r12.moveToFirst() // Catch: java.lang.Throwable -> L7f java.lang.Exception -> L81
L39:
java.lang.String r2 = "blob"
int r2 = r12.getColumnIndex(r2) // Catch: java.lang.Throwable -> L7f java.lang.Exception -> L81
byte[] r2 = r12.getBlob(r2) // Catch: java.lang.Throwable -> L7f java.lang.Exception -> L81
java.io.ByteArrayInputStream r3 = new java.io.ByteArrayInputStream // Catch: java.lang.Throwable -> L7f java.lang.Exception -> L81
r3.<init>(r2) // Catch: java.lang.Throwable -> L7f java.lang.Exception -> L81
java.io.ObjectInputStream r2 = new java.io.ObjectInputStream // Catch: java.lang.Throwable -> L5e java.lang.Exception -> L69
r2.<init>(r3) // Catch: java.lang.Throwable -> L5e java.lang.Exception -> L69
java.lang.Object r4 = r2.readObject() // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L6a
java.io.Serializable r4 = (java.io.Serializable) r4 // Catch: java.lang.Throwable -> L5c java.lang.Exception -> L6a
r2.close() // Catch: java.io.IOException -> L56 java.lang.Throwable -> L7f java.lang.Exception -> L81
L56:
r3.close() // Catch: java.io.IOException -> L5a java.lang.Throwable -> L7f java.lang.Exception -> L81
goto L73
L5a:
goto L73
L5c:
r4 = move-exception
goto L60
L5e:
r4 = move-exception
r2 = r10
L60:
if (r2 == 0) goto L65
r2.close() // Catch: java.io.IOException -> L65 java.lang.Throwable -> L7f java.lang.Exception -> L81
L65:
r3.close() // Catch: java.io.IOException -> L68 java.lang.Throwable -> L7f java.lang.Exception -> L81
L68:
throw r4 // Catch: java.lang.Throwable -> L7f java.lang.Exception -> L81
L69:
r2 = r10
L6a:
if (r2 == 0) goto L6f
r2.close() // Catch: java.io.IOException -> L6f java.lang.Throwable -> L7f java.lang.Exception -> L81
L6f:
r3.close() // Catch: java.io.IOException -> L72 java.lang.Throwable -> L7f java.lang.Exception -> L81
L72:
r4 = r10
L73:
if (r4 == 0) goto L78
r0.add(r4) // Catch: java.lang.Throwable -> L7f java.lang.Exception -> L81
L78:
boolean r2 = r12.moveToNext() // Catch: java.lang.Throwable -> L7f java.lang.Exception -> L81
if (r2 != 0) goto L39
goto L84
L7f:
r0 = move-exception
goto La4
L81:
r2 = move-exception
r10 = r12
goto L93
L84:
if (r12 == 0) goto L89
r12.close() // Catch: java.lang.Throwable -> Laf
L89:
if (r1 == 0) goto La2
L8b:
r1.close() // Catch: java.lang.Throwable -> Laf
goto La2
L8f:
r0 = move-exception
r12 = r10
goto La4
L92:
r2 = move-exception
L93:
java.lang.String r12 = "openSDK_LOG.ReportDatabaseHelper"
java.lang.String r3 = "getReportItemFromDB has exception."
com.tencent.open.a.f.b(r12, r3, r2) // Catch: java.lang.Throwable -> L8f
if (r10 == 0) goto L9f
r10.close() // Catch: java.lang.Throwable -> Laf
L9f:
if (r1 == 0) goto La2
goto L8b
La2:
monitor-exit(r11)
return r0
La4:
if (r12 == 0) goto La9
r12.close() // Catch: java.lang.Throwable -> Laf
La9:
if (r1 == 0) goto Lae
r1.close() // Catch: java.lang.Throwable -> Laf
Lae:
throw r0 // Catch: java.lang.Throwable -> Laf
Laf:
r12 = move-exception
monitor-exit(r11)
throw r12
*/
throw new UnsupportedOperationException("Method not decompiled: com.tencent.open.b.f.a(java.lang.String):java.util.List");
}
/* JADX WARN: Code restructure failed: missing block: B:69:0x0096, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:77:0x0092, code lost:
if (r1 == null) goto L55;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public synchronized void a(java.lang.String r9, java.util.List<java.io.Serializable> r10) {
/*
r8 = this;
monitor-enter(r8)
int r0 = r10.size() // Catch: java.lang.Throwable -> La0
if (r0 != 0) goto L9
monitor-exit(r8)
return
L9:
r1 = 20
if (r0 > r1) goto Le
goto L10
Le:
r0 = 20
L10:
boolean r1 = android.text.TextUtils.isEmpty(r9) // Catch: java.lang.Throwable -> La0
if (r1 == 0) goto L18
monitor-exit(r8)
return
L18:
r8.b(r9) // Catch: java.lang.Throwable -> La0
android.database.sqlite.SQLiteDatabase r1 = r8.getWritableDatabase() // Catch: java.lang.Throwable -> La0
if (r1 != 0) goto L23
monitor-exit(r8)
return
L23:
r1.beginTransaction() // Catch: java.lang.Throwable -> La0
android.content.ContentValues r2 = new android.content.ContentValues // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
r2.<init>() // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
r3 = 0
L2c:
if (r3 >= r0) goto L7a
java.lang.Object r4 = r10.get(r3) // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
java.io.Serializable r4 = (java.io.Serializable) r4 // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
if (r4 == 0) goto L74
java.lang.String r5 = "type"
r2.put(r5, r9) // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
java.io.ByteArrayOutputStream r5 = new java.io.ByteArrayOutputStream // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
r6 = 512(0x200, float:7.17E-43)
r5.<init>(r6) // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
r6 = 0
java.io.ObjectOutputStream r7 = new java.io.ObjectOutputStream // Catch: java.lang.Throwable -> L55 java.io.IOException -> L5f
r7.<init>(r5) // Catch: java.lang.Throwable -> L55 java.io.IOException -> L5f
r7.writeObject(r4) // Catch: java.lang.Throwable -> L52 java.io.IOException -> L60
r7.close() // Catch: java.io.IOException -> L4e java.lang.Throwable -> L86 java.lang.Exception -> L88
L4e:
r5.close() // Catch: java.io.IOException -> L66 java.lang.Throwable -> L86 java.lang.Exception -> L88
goto L66
L52:
r9 = move-exception
r6 = r7
goto L56
L55:
r9 = move-exception
L56:
if (r6 == 0) goto L5b
r6.close() // Catch: java.io.IOException -> L5b java.lang.Throwable -> L86 java.lang.Exception -> L88
L5b:
r5.close() // Catch: java.io.IOException -> L5e java.lang.Throwable -> L86 java.lang.Exception -> L88
L5e:
throw r9 // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
L5f:
r7 = r6
L60:
if (r7 == 0) goto L4e
r7.close() // Catch: java.io.IOException -> L4e java.lang.Throwable -> L86 java.lang.Exception -> L88
goto L4e
L66:
java.lang.String r4 = "blob"
byte[] r5 = r5.toByteArray() // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
r2.put(r4, r5) // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
java.lang.String r4 = "via_cgi_report"
r1.insert(r4, r6, r2) // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
L74:
r2.clear() // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
int r3 = r3 + 1
goto L2c
L7a:
r1.setTransactionSuccessful() // Catch: java.lang.Throwable -> L86 java.lang.Exception -> L88
r1.endTransaction() // Catch: java.lang.Throwable -> La0
if (r1 == 0) goto L95
L82:
r1.close() // Catch: java.lang.Throwable -> La0
goto L95
L86:
r9 = move-exception
goto L97
L88:
java.lang.String r9 = "openSDK_LOG.ReportDatabaseHelper"
java.lang.String r10 = "saveReportItemToDB has exception."
com.tencent.open.a.f.e(r9, r10) // Catch: java.lang.Throwable -> L86
r1.endTransaction() // Catch: java.lang.Throwable -> La0
if (r1 == 0) goto L95
goto L82
L95:
monitor-exit(r8)
return
L97:
r1.endTransaction() // Catch: java.lang.Throwable -> La0
if (r1 == 0) goto L9f
r1.close() // Catch: java.lang.Throwable -> La0
L9f:
throw r9 // Catch: java.lang.Throwable -> La0
La0:
r9 = move-exception
monitor-exit(r8)
throw r9
*/
throw new UnsupportedOperationException("Method not decompiled: com.tencent.open.b.f.a(java.lang.String, java.util.List):void");
}
}

View File

@@ -0,0 +1,667 @@
package com.tencent.open.b;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;
import android.os.SystemClock;
import android.text.TextUtils;
import com.tencent.open.SocialConstants;
import com.tencent.open.utils.HttpUtils;
import com.tencent.open.utils.h;
import com.tencent.open.utils.i;
import com.thoughtworks.xstream.XStream;
import com.ubt.jimu.course.view.fragment.JimuMissionListFragment;
import java.io.IOException;
import java.io.Serializable;
import java.net.SocketTimeoutException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import java.util.TimeZone;
import java.util.concurrent.Executor;
import org.apache.http.conn.ConnectTimeoutException;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class g {
protected static g a;
protected HandlerThread e;
protected Handler f;
protected Random b = new Random();
protected List<Serializable> d = Collections.synchronizedList(new ArrayList());
protected List<Serializable> c = Collections.synchronizedList(new ArrayList());
protected Executor g = h.b();
protected Executor h = h.b();
private g() {
this.e = null;
if (this.e == null) {
this.e = new HandlerThread("opensdk.report.handlerthread", 10);
this.e.start();
}
if (!this.e.isAlive() || this.e.getLooper() == null) {
return;
}
this.f = new Handler(this.e.getLooper()) { // from class: com.tencent.open.b.g.1
@Override // android.os.Handler
public void handleMessage(Message message) {
int i = message.what;
if (i == 1000) {
g.this.b();
} else if (i == 1001) {
g.this.e();
}
super.handleMessage(message);
}
};
}
public static synchronized g a() {
g gVar;
synchronized (g.class) {
if (a == null) {
a = new g();
}
gVar = a;
}
return gVar;
}
protected void b() {
this.h.execute(new Runnable() { // from class: com.tencent.open.b.g.4
/* JADX WARN: Removed duplicated region for block: B:21:0x00a5 A[Catch: Exception -> 0x00b8, TryCatch #0 {Exception -> 0x00b8, blocks: (B:3:0x0008, B:7:0x0011, B:10:0x0023, B:21:0x00a5, B:22:0x00b0, B:28:0x0094, B:30:0x0099, B:36:0x009e, B:14:0x003b, B:16:0x008a), top: B:2:0x0008, inners: #1, #2, #3 }] */
/* JADX WARN: Removed duplicated region for block: B:33:0x00a3 A[EDGE_INSN: B:33:0x00a3->B:20:0x00a3 BREAK A[LOOP:0: B:12:0x0039->B:34:?], SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:34:? A[LOOP:0: B:12:0x0039->B:34:?, LOOP_END, 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 void run() {
/*
r14 = this;
java.lang.String r0 = "report_cgi"
java.lang.String r1 = "http://wspeed.qq.com/w.cgi"
java.lang.String r2 = "-->doReportCgi, doupload exception"
java.lang.String r3 = "openSDK_LOG.ReportManager"
com.tencent.open.b.g r4 = com.tencent.open.b.g.this // Catch: java.lang.Exception -> Lb8
android.os.Bundle r4 = r4.c() // Catch: java.lang.Exception -> Lb8
if (r4 != 0) goto L11
return
L11:
android.content.Context r5 = com.tencent.open.utils.d.a() // Catch: java.lang.Exception -> Lb8
r6 = 0
com.tencent.open.utils.e r5 = com.tencent.open.utils.e.a(r5, r6) // Catch: java.lang.Exception -> Lb8
java.lang.String r7 = "Common_HttpRetryCount"
int r5 = r5.a(r7) // Catch: java.lang.Exception -> Lb8
if (r5 != 0) goto L23
r5 = 3
L23:
java.lang.StringBuilder r7 = new java.lang.StringBuilder // Catch: java.lang.Exception -> Lb8
r7.<init>() // Catch: java.lang.Exception -> Lb8
java.lang.String r8 = "-->doReportCgi, retryCount: "
r7.append(r8) // Catch: java.lang.Exception -> Lb8
r7.append(r5) // Catch: java.lang.Exception -> Lb8
java.lang.String r7 = r7.toString() // Catch: java.lang.Exception -> Lb8
com.tencent.open.a.f.b(r3, r7) // Catch: java.lang.Exception -> Lb8
r7 = 0
r8 = 0
L39:
r9 = 1
int r8 = r8 + r9
android.content.Context r10 = com.tencent.open.utils.d.a() // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
org.apache.http.client.HttpClient r10 = com.tencent.open.utils.HttpUtils.getHttpClient(r10, r6, r1) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
org.apache.http.client.methods.HttpPost r11 = new org.apache.http.client.methods.HttpPost // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
r11.<init>(r1) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
java.lang.String r12 = "Accept-Encoding"
java.lang.String r13 = "gzip"
r11.addHeader(r12, r13) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
java.lang.String r12 = "Content-Type"
java.lang.String r13 = "application/x-www-form-urlencoded"
r11.setHeader(r12, r13) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
java.lang.String r12 = com.tencent.open.utils.HttpUtils.encodeUrl(r4) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
byte[] r12 = com.tencent.open.utils.i.i(r12) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
org.apache.http.entity.ByteArrayEntity r13 = new org.apache.http.entity.ByteArrayEntity // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
r13.<init>(r12) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
r11.setEntity(r13) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
org.apache.http.HttpResponse r10 = r10.execute(r11) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
org.apache.http.StatusLine r10 = r10.getStatusLine() // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
int r10 = r10.getStatusCode() // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
java.lang.StringBuilder r11 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
r11.<init>() // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
java.lang.String r12 = "-->doReportCgi, statusCode: "
r11.append(r12) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
r11.append(r10) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
java.lang.String r11 = r11.toString() // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
com.tencent.open.a.f.b(r3, r11) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
r11 = 200(0xc8, float:2.8E-43)
if (r10 != r11) goto La3
com.tencent.open.b.f r10 = com.tencent.open.b.f.a() // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
r10.b(r0) // Catch: java.lang.Exception -> L93 java.net.SocketTimeoutException -> L98 org.apache.http.conn.ConnectTimeoutException -> L9d
r7 = 1
goto La3
L93:
r1 = move-exception
com.tencent.open.a.f.b(r3, r2, r1) // Catch: java.lang.Exception -> Lb8
goto La3
L98:
r9 = move-exception
com.tencent.open.a.f.b(r3, r2, r9) // Catch: java.lang.Exception -> Lb8
goto La1
L9d:
r9 = move-exception
com.tencent.open.a.f.b(r3, r2, r9) // Catch: java.lang.Exception -> Lb8
La1:
if (r8 < r5) goto L39
La3:
if (r7 != 0) goto Lb0
com.tencent.open.b.f r1 = com.tencent.open.b.f.a() // Catch: java.lang.Exception -> Lb8
com.tencent.open.b.g r2 = com.tencent.open.b.g.this // Catch: java.lang.Exception -> Lb8
java.util.List<java.io.Serializable> r2 = r2.c // Catch: java.lang.Exception -> Lb8
r1.a(r0, r2) // Catch: java.lang.Exception -> Lb8
Lb0:
com.tencent.open.b.g r0 = com.tencent.open.b.g.this // Catch: java.lang.Exception -> Lb8
java.util.List<java.io.Serializable> r0 = r0.c // Catch: java.lang.Exception -> Lb8
r0.clear() // Catch: java.lang.Exception -> Lb8
goto Lbe
Lb8:
r0 = move-exception
java.lang.String r1 = "-->doReportCgi, doupload exception out."
com.tencent.open.a.f.b(r3, r1, r0)
Lbe:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.tencent.open.b.g.AnonymousClass4.run():void");
}
});
}
protected Bundle c() {
if (this.c.size() == 0) {
return null;
}
b bVar = (b) this.c.get(0);
if (bVar == null) {
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "-->prepareCgiData, the 0th cgireportitem is null.");
return null;
}
String str = bVar.a.get(SocialConstants.PARAM_APP_ID);
List<Serializable> a2 = f.a().a("report_cgi");
if (a2 != null) {
this.c.addAll(a2);
}
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "-->prepareCgiData, mCgiList size: " + this.c.size());
if (this.c.size() == 0) {
return null;
}
Bundle bundle = new Bundle();
try {
bundle.putString(SocialConstants.PARAM_APP_ID, str);
bundle.putString("releaseversion", "OpenSdk_3.3.0.lite");
bundle.putString("device", Build.DEVICE);
bundle.putString("qua", "V1_AND_OpenSDK_3.3.0.lite_1077_RDM_B");
bundle.putString("key", "apn,frequency,commandid,resultcode,tmcost,reqsize,rspsize,detail,touin,deviceinfo");
for (int i = 0; i < this.c.size(); i++) {
b bVar2 = (b) this.c.get(i);
bundle.putString(i + "_1", bVar2.a.get("apn"));
bundle.putString(i + "_2", bVar2.a.get("frequency"));
bundle.putString(i + "_3", bVar2.a.get("commandid"));
bundle.putString(i + "_4", bVar2.a.get("resultCode"));
bundle.putString(i + "_5", bVar2.a.get("timeCost"));
bundle.putString(i + "_6", bVar2.a.get("reqSize"));
bundle.putString(i + "_7", bVar2.a.get("rspSize"));
bundle.putString(i + "_8", bVar2.a.get("detail"));
bundle.putString(i + "_9", bVar2.a.get("uin"));
bundle.putString(i + "_10", c.e(com.tencent.open.utils.d.a()) + "&" + bVar2.a.get("deviceInfo"));
}
com.tencent.open.a.f.a("openSDK_LOG.ReportManager", "-->prepareCgiData, end. params: " + bundle.toString());
return bundle;
} catch (Exception e) {
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "-->prepareCgiData, exception.", e);
return null;
}
}
protected Bundle d() {
List<Serializable> a2 = f.a().a("report_via");
if (a2 != null) {
this.d.addAll(a2);
}
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "-->prepareViaData, mViaList size: " + this.d.size());
if (this.d.size() == 0) {
return null;
}
JSONArray jSONArray = new JSONArray();
for (Serializable serializable : this.d) {
JSONObject jSONObject = new JSONObject();
b bVar = (b) serializable;
for (String str : bVar.a.keySet()) {
try {
String str2 = bVar.a.get(str);
if (str2 == null) {
str2 = "";
}
jSONObject.put(str, str2);
} catch (JSONException e) {
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "-->prepareViaData, put bundle to json array exception", e);
}
}
jSONArray.put(jSONObject);
}
com.tencent.open.a.f.a("openSDK_LOG.ReportManager", "-->prepareViaData, JSONArray array: " + jSONArray.toString());
Bundle bundle = new Bundle();
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject2.put("data", jSONArray);
bundle.putString("data", jSONObject2.toString());
return bundle;
} catch (JSONException e2) {
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "-->prepareViaData, put bundle to json array exception", e2);
return null;
}
}
protected void e() {
this.g.execute(new Runnable() { // from class: com.tencent.open.b.g.5
@Override // java.lang.Runnable
public void run() {
int i;
try {
Bundle d = g.this.d();
if (d == null) {
return;
}
com.tencent.open.a.f.a("openSDK_LOG.ReportManager", "-->doReportVia, params: " + d.toString());
int a2 = e.a();
int i2 = 0;
long elapsedRealtime = SystemClock.elapsedRealtime();
boolean z = false;
int i3 = 0;
long j = 0;
long j2 = 0;
do {
int i4 = i2 + 1;
try {
try {
try {
try {
i.a openUrl2 = HttpUtils.openUrl2(com.tencent.open.utils.d.a(), "http://appsupport.qq.com/cgi-bin/appstage/mstats_batch_report", "POST", d);
try {
i = i.d(openUrl2.a).getInt("ret");
} catch (JSONException unused) {
i = -4;
}
if (i == 0 || !TextUtils.isEmpty(openUrl2.a)) {
i4 = a2;
z = true;
}
j = openUrl2.b;
j2 = openUrl2.c;
i2 = i4;
} catch (HttpUtils.HttpStatusException e) {
try {
i3 = Integer.parseInt(e.getMessage().replace(HttpUtils.HttpStatusException.ERROR_INFO, ""));
} catch (Exception unused2) {
}
} catch (SocketTimeoutException unused3) {
elapsedRealtime = SystemClock.elapsedRealtime();
i2 = i4;
i3 = -8;
j = 0;
j2 = 0;
} catch (Exception unused4) {
i2 = a2;
i3 = -6;
j = 0;
j2 = 0;
}
} catch (HttpUtils.NetworkUnavailableException unused5) {
g.this.d.clear();
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "doReportVia, NetworkUnavailableException.");
return;
} catch (ConnectTimeoutException unused6) {
elapsedRealtime = SystemClock.elapsedRealtime();
i2 = i4;
i3 = -7;
j = 0;
j2 = 0;
}
} catch (IOException e2) {
i3 = HttpUtils.getErrorCodeFromException(e2);
i2 = i4;
j = 0;
j2 = 0;
}
} catch (JSONException unused7) {
i2 = i4;
i3 = -4;
j = 0;
j2 = 0;
}
} while (i2 < a2);
g.this.a("mapp_apptrace_sdk", elapsedRealtime, j, j2, i3, null, false);
if (z) {
f.a().b("report_via");
} else {
f.a().a("report_via", g.this.d);
}
g.this.d.clear();
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "-->doReportVia, uploadSuccess: " + z);
} catch (Exception e3) {
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "-->doReportVia, exception in serial executor.", e3);
}
}
});
}
public void a(final Bundle bundle, String str, final boolean z) {
if (bundle == null) {
return;
}
com.tencent.open.a.f.a("openSDK_LOG.ReportManager", "-->reportVia, bundle: " + bundle.toString());
if (a("report_via", str) || z) {
this.g.execute(new Runnable() { // from class: com.tencent.open.b.g.2
@Override // java.lang.Runnable
public void run() {
try {
Bundle bundle2 = new Bundle();
bundle2.putString("uin", "1000");
bundle2.putString("imei", c.b(com.tencent.open.utils.d.a()));
bundle2.putString("imsi", c.c(com.tencent.open.utils.d.a()));
bundle2.putString("android_id", c.d(com.tencent.open.utils.d.a()));
bundle2.putString("mac", c.a());
bundle2.putString("platform", "1");
bundle2.putString("os_ver", Build.VERSION.RELEASE);
bundle2.putString(JimuMissionListFragment.POSITION, i.c(com.tencent.open.utils.d.a()));
bundle2.putString("network", a.a(com.tencent.open.utils.d.a()));
bundle2.putString("language", c.b());
bundle2.putString("resolution", c.a(com.tencent.open.utils.d.a()));
bundle2.putString("apn", a.b(com.tencent.open.utils.d.a()));
bundle2.putString("model_name", Build.MODEL);
bundle2.putString("timezone", TimeZone.getDefault().getID());
bundle2.putString("sdk_ver", "3.3.0.lite");
bundle2.putString("qz_ver", i.d(com.tencent.open.utils.d.a(), "com.qzone"));
bundle2.putString("qq_ver", i.c(com.tencent.open.utils.d.a(), "com.tencent.mobileqq"));
bundle2.putString("qua", i.e(com.tencent.open.utils.d.a(), com.tencent.open.utils.d.b()));
bundle2.putString("packagename", com.tencent.open.utils.d.b());
bundle2.putString("app_ver", i.d(com.tencent.open.utils.d.a(), com.tencent.open.utils.d.b()));
if (bundle != null) {
bundle2.putAll(bundle);
}
g.this.d.add(new b(bundle2));
int size = g.this.d.size();
int a2 = com.tencent.open.utils.e.a(com.tencent.open.utils.d.a(), (String) null).a("Agent_ReportTimeInterval");
if (a2 == 0) {
a2 = XStream.PRIORITY_VERY_HIGH;
}
if (!g.this.a("report_via", size) && !z) {
if (g.this.f.hasMessages(1001)) {
return;
}
Message obtain = Message.obtain();
obtain.what = 1001;
g.this.f.sendMessageDelayed(obtain, a2);
return;
}
g.this.e();
g.this.f.removeMessages(1001);
} catch (Exception e) {
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "--> reporVia, exception in sub thread.", e);
}
}
});
}
}
public void a(String str, long j, long j2, long j3, int i) {
a(str, j, j2, j3, i, "", false);
}
public void a(final String str, final long j, final long j2, final long j3, final int i, final String str2, final boolean z) {
com.tencent.open.a.f.a("openSDK_LOG.ReportManager", "-->reportCgi, command: " + str + " | startTime: " + j + " | reqSize:" + j2 + " | rspSize: " + j3 + " | responseCode: " + i + " | detail: " + str2);
if (a("report_cgi", "" + i) || z) {
this.h.execute(new Runnable() { // from class: com.tencent.open.b.g.3
@Override // java.lang.Runnable
public void run() {
try {
long elapsedRealtime = SystemClock.elapsedRealtime() - j;
Bundle bundle = new Bundle();
String a2 = a.a(com.tencent.open.utils.d.a());
bundle.putString("apn", a2);
bundle.putString(SocialConstants.PARAM_APP_ID, "1000067");
bundle.putString("commandid", str);
bundle.putString("detail", str2);
StringBuilder sb = new StringBuilder();
sb.append("network=");
sb.append(a2);
sb.append('&');
sb.append("sdcard=");
sb.append(Environment.getExternalStorageState().equals("mounted") ? 1 : 0);
sb.append('&');
sb.append("wifi=");
sb.append(a.e(com.tencent.open.utils.d.a()));
bundle.putString("deviceInfo", sb.toString());
int a3 = 100 / g.this.a(i);
if (a3 <= 0) {
a3 = 1;
} else if (a3 > 100) {
a3 = 100;
}
bundle.putString("frequency", a3 + "");
bundle.putString("reqSize", j2 + "");
bundle.putString("resultCode", i + "");
bundle.putString("rspSize", j3 + "");
bundle.putString("timeCost", elapsedRealtime + "");
bundle.putString("uin", "1000");
g.this.c.add(new b(bundle));
int size = g.this.c.size();
int a4 = com.tencent.open.utils.e.a(com.tencent.open.utils.d.a(), (String) null).a("Agent_ReportTimeInterval");
if (a4 == 0) {
a4 = XStream.PRIORITY_VERY_HIGH;
}
if (!g.this.a("report_cgi", size) && !z) {
if (!g.this.f.hasMessages(1000)) {
Message obtain = Message.obtain();
obtain.what = 1000;
g.this.f.sendMessageDelayed(obtain, a4);
}
}
g.this.b();
g.this.f.removeMessages(1000);
} catch (Exception e) {
com.tencent.open.a.f.b("openSDK_LOG.ReportManager", "--> reportCGI, exception in sub thread.", e);
}
}
});
}
}
/* JADX WARN: Code restructure failed: missing block: B:10:0x0055, code lost:
if (r5.b.nextInt(100) < r6) goto L16;
*/
/* JADX WARN: Code restructure failed: missing block: B:11:0x0057, code lost:
r2 = true;
*/
/* JADX WARN: Code restructure failed: missing block: B:18:0x003f, code lost:
if (r5.b.nextInt(100) < r6) goto L16;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
protected boolean a(java.lang.String r6, java.lang.String r7) {
/*
r5 = this;
java.lang.StringBuilder r0 = new java.lang.StringBuilder
r0.<init>()
java.lang.String r1 = "-->availableFrequency, report: "
r0.append(r1)
r0.append(r6)
java.lang.String r1 = " | ext: "
r0.append(r1)
r0.append(r7)
java.lang.String r0 = r0.toString()
java.lang.String r1 = "openSDK_LOG.ReportManager"
com.tencent.open.a.f.b(r1, r0)
boolean r0 = android.text.TextUtils.isEmpty(r6)
r2 = 0
if (r0 == 0) goto L26
return r2
L26:
java.lang.String r0 = "report_cgi"
boolean r0 = r6.equals(r0)
r3 = 1
r4 = 100
if (r0 == 0) goto L43
int r6 = java.lang.Integer.parseInt(r7) // Catch: java.lang.Exception -> L42
int r6 = r5.a(r6)
java.util.Random r7 = r5.b
int r7 = r7.nextInt(r4)
if (r7 >= r6) goto L5b
goto L57
L42:
return r2
L43:
java.lang.String r0 = "report_via"
boolean r6 = r6.equals(r0)
if (r6 == 0) goto L59
int r6 = com.tencent.open.b.e.a(r7)
java.util.Random r7 = r5.b
int r7 = r7.nextInt(r4)
if (r7 >= r6) goto L5b
L57:
r2 = 1
goto L5b
L59:
r6 = 100
L5b:
java.lang.StringBuilder r7 = new java.lang.StringBuilder
r7.<init>()
java.lang.String r0 = "-->availableFrequency, result: "
r7.append(r0)
r7.append(r2)
java.lang.String r0 = " | frequency: "
r7.append(r0)
r7.append(r6)
java.lang.String r6 = r7.toString()
com.tencent.open.a.f.b(r1, r6)
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: com.tencent.open.b.g.a(java.lang.String, java.lang.String):boolean");
}
/* JADX WARN: Code restructure failed: missing block: B:14:0x0033, code lost:
if (r0 == 0) goto L6;
*/
/* JADX WARN: Code restructure failed: missing block: B:4:0x0019, code lost:
if (r0 == 0) goto L6;
*/
/* JADX WARN: Code restructure failed: missing block: B:5:0x001b, code lost:
r0 = 5;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
protected boolean a(java.lang.String r5, int r6) {
/*
r4 = this;
java.lang.String r0 = "report_cgi"
boolean r0 = r5.equals(r0)
r1 = 5
r2 = 0
r3 = 0
if (r0 == 0) goto L1d
android.content.Context r0 = com.tencent.open.utils.d.a()
com.tencent.open.utils.e r0 = com.tencent.open.utils.e.a(r0, r2)
java.lang.String r2 = "Common_CGIReportMaxcount"
int r0 = r0.a(r2)
if (r0 != 0) goto L37
L1b:
r0 = 5
goto L37
L1d:
java.lang.String r0 = "report_via"
boolean r0 = r5.equals(r0)
if (r0 == 0) goto L36
android.content.Context r0 = com.tencent.open.utils.d.a()
com.tencent.open.utils.e r0 = com.tencent.open.utils.e.a(r0, r2)
java.lang.String r2 = "Agent_ReportBatchCount"
int r0 = r0.a(r2)
if (r0 != 0) goto L37
goto L1b
L36:
r0 = 0
L37:
java.lang.StringBuilder r1 = new java.lang.StringBuilder
r1.<init>()
java.lang.String r2 = "-->availableCount, report: "
r1.append(r2)
r1.append(r5)
java.lang.String r5 = " | dataSize: "
r1.append(r5)
r1.append(r6)
java.lang.String r5 = " | maxcount: "
r1.append(r5)
r1.append(r0)
java.lang.String r5 = r1.toString()
java.lang.String r1 = "openSDK_LOG.ReportManager"
com.tencent.open.a.f.b(r1, r5)
if (r6 < r0) goto L61
r5 = 1
return r5
L61:
return r3
*/
throw new UnsupportedOperationException("Method not decompiled: com.tencent.open.b.g.a(java.lang.String, int):boolean");
}
protected int a(int i) {
if (i == 0) {
int a2 = com.tencent.open.utils.e.a(com.tencent.open.utils.d.a(), (String) null).a("Common_CGIReportFrequencySuccess");
if (a2 == 0) {
return 10;
}
return a2;
}
int a3 = com.tencent.open.utils.e.a(com.tencent.open.utils.d.a(), (String) null).a("Common_CGIReportFrequencyFailed");
if (a3 == 0) {
return 100;
}
return a3;
}
public void a(final String str, final String str2, final Bundle bundle, final boolean z) {
h.a(new Runnable() { // from class: com.tencent.open.b.g.6
/* JADX WARN: Removed duplicated region for block: B:27:0x00e2 A[Catch: Exception -> 0x00f4, TryCatch #5 {Exception -> 0x00f4, blocks: (B:3:0x0002, B:5:0x0006, B:8:0x000c, B:11:0x0013, B:13:0x003c, B:14:0x0040, B:16:0x004e, B:17:0x0084, B:27:0x00e2, B:29:0x00e8, B:46:0x00cd, B:37:0x00d3, B:43:0x00d9, B:50:0x0062, B:52:0x0070, B:53:0x00ee), top: B:2:0x0002 }] */
/* JADX WARN: Removed duplicated region for block: B:29:0x00e8 A[Catch: Exception -> 0x00f4, TryCatch #5 {Exception -> 0x00f4, blocks: (B:3:0x0002, B:5:0x0006, B:8:0x000c, B:11:0x0013, B:13:0x003c, B:14:0x0040, B:16:0x004e, B:17:0x0084, B:27:0x00e2, B:29:0x00e8, B:46:0x00cd, B:37:0x00d3, B:43:0x00d9, B:50:0x0062, B:52:0x0070, B:53:0x00ee), top: B:2:0x0002 }] */
/* JADX WARN: Removed duplicated region for block: B:40:0x00e0 A[EDGE_INSN: B:40:0x00e0->B:26:0x00e0 BREAK A[LOOP:0: B:19:0x0094->B:41:?], SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:41:? A[LOOP:0: B:19:0x0094->B:41:?, LOOP_END, 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 void run() {
/*
Method dump skipped, instructions count: 250
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: com.tencent.open.b.g.AnonymousClass6.run():void");
}
});
}
}