discord-jadx/app/src/main/java/c/i/a/f/i/b/t3.java

105 lines
3.4 KiB
Java

package c.i.a.f.i.b;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import c.i.a.f.e.o.g;
/* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */
public final class t3 implements Runnable {
public final /* synthetic */ int i;
public final /* synthetic */ String j;
public final /* synthetic */ Object k;
public final /* synthetic */ Object l;
public final /* synthetic */ Object m;
public final /* synthetic */ q3 n;
public t3(q3 q3Var, int i, String str, Object obj, Object obj2, Object obj3) {
this.n = q3Var;
this.i = i;
this.j = str;
this.k = obj;
this.l = obj2;
this.m = obj3;
}
@Override // java.lang.Runnable
public final void run() {
d4 o = this.n.a.o();
if (!o.n()) {
this.n.v(6, "Persisted config not initialized. Not logging error/warn");
return;
}
q3 q3Var = this.n;
boolean z2 = true;
if (q3Var.f1189c == 0) {
c cVar = q3Var.a.h;
if (cVar.d == null) {
synchronized (cVar) {
if (cVar.d == null) {
ApplicationInfo applicationInfo = cVar.a.b.getApplicationInfo();
String a = g.a();
if (applicationInfo != null) {
String str = applicationInfo.processName;
cVar.d = Boolean.valueOf(str != null && str.equals(a));
}
if (cVar.d == null) {
cVar.d = Boolean.TRUE;
cVar.g().f.a("My process not in the list of running processes");
}
}
}
}
if (cVar.d.booleanValue()) {
this.n.f1189c = 'C';
} else {
this.n.f1189c = 'c';
}
}
q3 q3Var2 = this.n;
if (q3Var2.d < 0) {
q3Var2.d = 33025;
}
char charAt = "01VDIWEA?".charAt(this.i);
q3 q3Var3 = this.n;
char c2 = q3Var3.f1189c;
long j = q3Var3.d;
String u = q3.u(true, this.j, this.k, this.l, this.m);
StringBuilder sb = new StringBuilder(String.valueOf(u).length() + 24);
sb.append("2");
sb.append(charAt);
sb.append(c2);
sb.append(j);
sb.append(":");
sb.append(u);
String sb2 = sb.toString();
if (sb2.length() > 1024) {
sb2 = this.j.substring(0, 1024);
}
k4 k4Var = o.e;
k4Var.e.b();
if (k4Var.e.w().getLong(k4Var.a, 0) == 0) {
k4Var.a();
}
if (sb2 == null) {
sb2 = "";
}
long j2 = k4Var.e.w().getLong(k4Var.b, 0);
if (j2 <= 0) {
SharedPreferences.Editor edit = k4Var.e.w().edit();
edit.putString(k4Var.f1162c, sb2);
edit.putLong(k4Var.b, 1);
edit.apply();
return;
}
long j3 = j2 + 1;
if ((k4Var.e.e().v0().nextLong() & Long.MAX_VALUE) >= Long.MAX_VALUE / j3) {
z2 = false;
}
SharedPreferences.Editor edit2 = k4Var.e.w().edit();
if (z2) {
edit2.putString(k4Var.f1162c, sb2);
}
edit2.putLong(k4Var.b, j3);
edit2.apply();
}
}