232 lines
7.6 KiB
Java
232 lines
7.6 KiB
Java
package com.google.android.gms.analytics;
|
|
|
|
import android.content.Context;
|
|
import android.view.KeyEvent;
|
|
import com.google.android.gms.analytics.HitBuilders;
|
|
import com.google.android.gms.internal.gtm.zzch;
|
|
import java.lang.Thread;
|
|
import java.util.ArrayList;
|
|
import net.sf.scuba.smartcards.ISO7816;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class ExceptionReporter implements Thread.UncaughtExceptionHandler {
|
|
private final Thread.UncaughtExceptionHandler zzrk;
|
|
private final Tracker zzrl;
|
|
private final Context zzrm;
|
|
private ExceptionParser zzrn;
|
|
private GoogleAnalytics zzro;
|
|
private static final byte[] $$a = {82, ISO7816.INS_UNBLOCK_CHV, -108, -93};
|
|
private static final int $$b = 220;
|
|
private static int $10 = 0;
|
|
private static int $11 = 1;
|
|
private static int c = 0;
|
|
private static int e = 1;
|
|
private static long d = 5880044799108322928L;
|
|
|
|
public ExceptionReporter(Tracker tracker, Thread.UncaughtExceptionHandler uncaughtExceptionHandler, Context context) {
|
|
String name;
|
|
String str;
|
|
if (tracker == null) {
|
|
throw new NullPointerException("tracker cannot be null");
|
|
}
|
|
if (context == null) {
|
|
throw new NullPointerException("context cannot be null");
|
|
}
|
|
this.zzrk = uncaughtExceptionHandler;
|
|
this.zzrl = tracker;
|
|
this.zzrn = new StandardExceptionParser(context, new ArrayList());
|
|
this.zzrm = context.getApplicationContext();
|
|
if (uncaughtExceptionHandler == null) {
|
|
Object[] objArr = new Object[1];
|
|
b(new char[]{1496, 30288, 58108, 24419}, 29587 - KeyEvent.keyCodeFromString(""), objArr);
|
|
name = ((String) objArr[0]).intern();
|
|
} else {
|
|
name = uncaughtExceptionHandler.getClass().getName();
|
|
}
|
|
String valueOf = String.valueOf(name);
|
|
if (valueOf.length() != 0) {
|
|
int i = e + 71;
|
|
c = i % 128;
|
|
int i2 = i % 2;
|
|
str = "ExceptionReporter created, original handler is ".concat(valueOf);
|
|
} else {
|
|
str = new String("ExceptionReporter created, original handler is ");
|
|
int i3 = 2 % 2;
|
|
}
|
|
zzch.zzab(str);
|
|
int i4 = c + 89;
|
|
e = i4 % 128;
|
|
if (i4 % 2 == 0) {
|
|
int i5 = 67 / 0;
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:10:0x0025 */
|
|
/* JADX WARN: Removed duplicated region for block: B:7:0x001d */
|
|
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0025 -> B:4:0x002b). Please report as a decompilation issue!!! */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private static void f(byte r6, byte r7, short r8, java.lang.Object[] r9) {
|
|
/*
|
|
byte[] r0 = com.google.android.gms.analytics.ExceptionReporter.$$a
|
|
int r8 = r8 * 2
|
|
int r8 = r8 + 4
|
|
int r6 = r6 * 2
|
|
int r6 = r6 + 1
|
|
int r7 = r7 + 77
|
|
byte[] r1 = new byte[r6]
|
|
r2 = 0
|
|
if (r0 != 0) goto L15
|
|
r7 = r6
|
|
r3 = r8
|
|
r4 = r2
|
|
goto L2b
|
|
L15:
|
|
r3 = r2
|
|
L16:
|
|
byte r4 = (byte) r7
|
|
r1[r3] = r4
|
|
int r3 = r3 + 1
|
|
if (r3 != r6) goto L25
|
|
java.lang.String r6 = new java.lang.String
|
|
r6.<init>(r1, r2)
|
|
r9[r2] = r6
|
|
return
|
|
L25:
|
|
r4 = r0[r8]
|
|
r5 = r3
|
|
r3 = r8
|
|
r8 = r4
|
|
r4 = r5
|
|
L2b:
|
|
int r8 = -r8
|
|
int r7 = r7 + r8
|
|
int r8 = r3 + 1
|
|
r3 = r4
|
|
goto L16
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.analytics.ExceptionReporter.f(byte, byte, short, java.lang.Object[]):void");
|
|
}
|
|
|
|
@Override // java.lang.Thread.UncaughtExceptionHandler
|
|
public void uncaughtException(Thread thread, Throwable th) {
|
|
String str;
|
|
String str2;
|
|
String str3;
|
|
int i = 2 % 2;
|
|
Object obj = null;
|
|
if (this.zzrn != null) {
|
|
if (thread != null) {
|
|
int i2 = e + 29;
|
|
c = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
str3 = thread.getName();
|
|
} else {
|
|
str3 = null;
|
|
}
|
|
str = this.zzrn.getDescription(str3, th);
|
|
} else {
|
|
str = "UncaughtException";
|
|
}
|
|
String valueOf = String.valueOf(str);
|
|
if (valueOf.length() != 0) {
|
|
int i4 = e + 3;
|
|
c = i4 % 128;
|
|
int i5 = i4 % 2;
|
|
str2 = "Reporting uncaught exception: ".concat(valueOf);
|
|
} else {
|
|
str2 = new String("Reporting uncaught exception: ");
|
|
}
|
|
zzch.zzab(str2);
|
|
this.zzrl.send(new HitBuilders.ExceptionBuilder().setDescription(str).setFatal(true).build());
|
|
if (this.zzro == null) {
|
|
int i6 = c + 45;
|
|
e = i6 % 128;
|
|
if (i6 % 2 == 0) {
|
|
this.zzro = GoogleAnalytics.getInstance(this.zzrm);
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
this.zzro = GoogleAnalytics.getInstance(this.zzrm);
|
|
}
|
|
GoogleAnalytics googleAnalytics = this.zzro;
|
|
googleAnalytics.dispatchLocalHits();
|
|
googleAnalytics.zzab().zzcs().zzcj();
|
|
if (this.zzrk != null) {
|
|
zzch.zzab("Passing exception to the original handler");
|
|
this.zzrk.uncaughtException(thread, th);
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:51:0x0204 */
|
|
/* JADX WARN: Removed duplicated region for block: B:52:0x0205 */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private static void b(char[] r16, int r17, java.lang.Object[] r18) {
|
|
/*
|
|
Method dump skipped, instructions count: 526
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.analytics.ExceptionReporter.b(char[], int, java.lang.Object[]):void");
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final Thread.UncaughtExceptionHandler zzaf() {
|
|
int i = 2 % 2;
|
|
int i2 = c + 71;
|
|
int i3 = i2 % 128;
|
|
e = i3;
|
|
if (i2 % 2 == 0) {
|
|
throw null;
|
|
}
|
|
Thread.UncaughtExceptionHandler uncaughtExceptionHandler = this.zzrk;
|
|
int i4 = i3 + 41;
|
|
c = i4 % 128;
|
|
if (i4 % 2 == 0) {
|
|
return uncaughtExceptionHandler;
|
|
}
|
|
throw null;
|
|
}
|
|
|
|
public void setExceptionParser(ExceptionParser exceptionParser) {
|
|
int i = 2 % 2;
|
|
int i2 = c;
|
|
int i3 = i2 + 23;
|
|
e = i3 % 128;
|
|
int i4 = i3 % 2;
|
|
this.zzrn = exceptionParser;
|
|
int i5 = i2 + 87;
|
|
e = i5 % 128;
|
|
if (i5 % 2 != 0) {
|
|
return;
|
|
}
|
|
Object obj = null;
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
|
|
public ExceptionParser getExceptionParser() {
|
|
ExceptionParser exceptionParser;
|
|
int i = 2 % 2;
|
|
int i2 = c;
|
|
int i3 = i2 + 29;
|
|
e = i3 % 128;
|
|
if (i3 % 2 == 0) {
|
|
exceptionParser = this.zzrn;
|
|
int i4 = 65 / 0;
|
|
} else {
|
|
exceptionParser = this.zzrn;
|
|
}
|
|
int i5 = i2 + 7;
|
|
e = i5 % 128;
|
|
if (i5 % 2 != 0) {
|
|
return exceptionParser;
|
|
}
|
|
throw null;
|
|
}
|
|
}
|