241 lines
6.7 KiB
Java
241 lines
6.7 KiB
Java
package com.google.android.gms.measurement.internal;
|
|
|
|
import android.text.TextUtils;
|
|
import android.util.Log;
|
|
import android.util.Pair;
|
|
import com.google.android.gms.common.internal.Preconditions;
|
|
import com.google.android.gms.measurement.AppMeasurement;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class zzas extends zzcs {
|
|
private char c;
|
|
private long d;
|
|
private String e;
|
|
private final zzau f;
|
|
private final zzau g;
|
|
private final zzau h;
|
|
private final zzau i;
|
|
private final zzau j;
|
|
private final zzau k;
|
|
private final zzau l;
|
|
private final zzau m;
|
|
private final zzau n;
|
|
|
|
zzas(zzbw zzbwVar) {
|
|
super(zzbwVar);
|
|
this.c = (char) 0;
|
|
this.d = -1L;
|
|
this.f = new zzau(this, 6, false, false);
|
|
this.g = new zzau(this, 6, true, false);
|
|
this.h = new zzau(this, 6, false, true);
|
|
this.i = new zzau(this, 5, false, false);
|
|
this.j = new zzau(this, 5, true, false);
|
|
this.k = new zzau(this, 5, false, true);
|
|
this.l = new zzau(this, 4, false, false);
|
|
this.m = new zzau(this, 3, false, false);
|
|
this.n = new zzau(this, 2, false, false);
|
|
}
|
|
|
|
private final String D() {
|
|
String str;
|
|
synchronized (this) {
|
|
if (this.e == null) {
|
|
if (this.a.C() != null) {
|
|
this.e = this.a.C();
|
|
} else {
|
|
this.e = zzq.t();
|
|
}
|
|
}
|
|
str = this.e;
|
|
}
|
|
return str;
|
|
}
|
|
|
|
protected static Object a(String str) {
|
|
if (str == null) {
|
|
return null;
|
|
}
|
|
return new zzav(str);
|
|
}
|
|
|
|
private static String b(String str) {
|
|
if (TextUtils.isEmpty(str)) {
|
|
return "";
|
|
}
|
|
int lastIndexOf = str.lastIndexOf(46);
|
|
return lastIndexOf == -1 ? str : str.substring(0, lastIndexOf);
|
|
}
|
|
|
|
public final zzau A() {
|
|
return this.m;
|
|
}
|
|
|
|
public final zzau B() {
|
|
return this.n;
|
|
}
|
|
|
|
public final String C() {
|
|
Pair<String, Long> a = l().d.a();
|
|
if (a == null || a == zzbd.v) {
|
|
return null;
|
|
}
|
|
String valueOf = String.valueOf(a.second);
|
|
String str = (String) a.first;
|
|
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 1 + String.valueOf(str).length());
|
|
sb.append(valueOf);
|
|
sb.append(":");
|
|
sb.append(str);
|
|
return sb.toString();
|
|
}
|
|
|
|
@Override // com.google.android.gms.measurement.internal.zzcs
|
|
protected final boolean q() {
|
|
return false;
|
|
}
|
|
|
|
public final zzau t() {
|
|
return this.f;
|
|
}
|
|
|
|
public final zzau u() {
|
|
return this.g;
|
|
}
|
|
|
|
public final zzau v() {
|
|
return this.h;
|
|
}
|
|
|
|
public final zzau w() {
|
|
return this.i;
|
|
}
|
|
|
|
public final zzau x() {
|
|
return this.j;
|
|
}
|
|
|
|
public final zzau y() {
|
|
return this.k;
|
|
}
|
|
|
|
public final zzau z() {
|
|
return this.l;
|
|
}
|
|
|
|
protected final void a(int i, boolean z, boolean z2, String str, Object obj, Object obj2, Object obj3) {
|
|
if (!z && a(i)) {
|
|
a(i, a(false, str, obj, obj2, obj3));
|
|
}
|
|
if (z2 || i < 5) {
|
|
return;
|
|
}
|
|
Preconditions.a(str);
|
|
zzbr x = this.a.x();
|
|
if (x == null) {
|
|
a(6, "Scheduler not set. Not logging error/warn");
|
|
} else {
|
|
if (!x.n()) {
|
|
a(6, "Scheduler not initialized. Not logging error/warn");
|
|
return;
|
|
}
|
|
if (i < 0) {
|
|
i = 0;
|
|
}
|
|
x.a(new zzat(this, i >= 9 ? 8 : i, str, obj, obj2, obj3));
|
|
}
|
|
}
|
|
|
|
protected final boolean a(int i) {
|
|
return Log.isLoggable(D(), i);
|
|
}
|
|
|
|
protected final void a(int i, String str) {
|
|
Log.println(i, D(), str);
|
|
}
|
|
|
|
static String a(boolean z, String str, Object obj, Object obj2, Object obj3) {
|
|
String str2 = "";
|
|
if (str == null) {
|
|
str = "";
|
|
}
|
|
String a = a(z, obj);
|
|
String a2 = a(z, obj2);
|
|
String a3 = a(z, obj3);
|
|
StringBuilder sb = new StringBuilder();
|
|
if (!TextUtils.isEmpty(str)) {
|
|
sb.append(str);
|
|
str2 = ": ";
|
|
}
|
|
if (!TextUtils.isEmpty(a)) {
|
|
sb.append(str2);
|
|
sb.append(a);
|
|
str2 = ", ";
|
|
}
|
|
if (!TextUtils.isEmpty(a2)) {
|
|
sb.append(str2);
|
|
sb.append(a2);
|
|
str2 = ", ";
|
|
}
|
|
if (!TextUtils.isEmpty(a3)) {
|
|
sb.append(str2);
|
|
sb.append(a3);
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
private static String a(boolean z, Object obj) {
|
|
String str;
|
|
String className;
|
|
if (obj == null) {
|
|
return "";
|
|
}
|
|
if (obj instanceof Integer) {
|
|
obj = Long.valueOf(((Integer) obj).intValue());
|
|
}
|
|
if (obj instanceof Long) {
|
|
if (!z) {
|
|
return String.valueOf(obj);
|
|
}
|
|
Long l = (Long) obj;
|
|
if (Math.abs(l.longValue()) < 100) {
|
|
return String.valueOf(obj);
|
|
}
|
|
String str2 = String.valueOf(obj).charAt(0) == '-' ? "-" : "";
|
|
String valueOf = String.valueOf(Math.abs(l.longValue()));
|
|
long round = Math.round(Math.pow(10.0d, valueOf.length() - 1));
|
|
long round2 = Math.round(Math.pow(10.0d, valueOf.length()) - 1.0d);
|
|
StringBuilder sb = new StringBuilder(str2.length() + 43 + str2.length());
|
|
sb.append(str2);
|
|
sb.append(round);
|
|
sb.append("...");
|
|
sb.append(str2);
|
|
sb.append(round2);
|
|
return sb.toString();
|
|
}
|
|
if (obj instanceof Boolean) {
|
|
return String.valueOf(obj);
|
|
}
|
|
if (obj instanceof Throwable) {
|
|
Throwable th = (Throwable) obj;
|
|
StringBuilder sb2 = new StringBuilder(z ? th.getClass().getName() : th.toString());
|
|
String b = b(AppMeasurement.class.getCanonicalName());
|
|
String b2 = b(zzbw.class.getCanonicalName());
|
|
for (StackTraceElement stackTraceElement : th.getStackTrace()) {
|
|
if (!stackTraceElement.isNativeMethod() && (className = stackTraceElement.getClassName()) != null) {
|
|
String b3 = b(className);
|
|
if (b3.equals(b) || b3.equals(b2)) {
|
|
sb2.append(": ");
|
|
sb2.append(stackTraceElement);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return sb2.toString();
|
|
}
|
|
if (!(obj instanceof zzav)) {
|
|
return z ? "-" : String.valueOf(obj);
|
|
}
|
|
str = ((zzav) obj).a;
|
|
return str;
|
|
}
|
|
}
|