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 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 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; } } }