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

110 lines
5.1 KiB
Java

package c.i.a.f.i.b;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
/* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */
public final class c7 implements Runnable {
public final /* synthetic */ boolean i;
public final /* synthetic */ Uri j;
public final /* synthetic */ String k;
public final /* synthetic */ String l;
public final /* synthetic */ y6 m;
public c7(y6 y6Var, boolean z2, Uri uri, String str, String str2) {
this.m = y6Var;
this.i = z2;
this.j = uri;
this.k = str;
this.l = str2;
}
/* JADX WARNING: Removed duplicated region for block: B:30:0x00a0 */
/* JADX WARNING: Removed duplicated region for block: B:43:0x00fb */
/* JADX WARNING: Removed duplicated region for block: B:57:0x013d */
/* JADX WARNING: Removed duplicated region for block: B:90:? A[RETURN, SYNTHETIC] */
@Override // java.lang.Runnable
public final void run() {
Bundle bundle;
Bundle bundle2;
y6 y6Var = this.m;
boolean z2 = this.i;
Uri uri = this.j;
String str = this.k;
String str2 = this.l;
y6Var.i.b();
try {
if (y6Var.i.a.h.o(p.f1179e0) || y6Var.i.a.h.o(p.f1181g0) || y6Var.i.a.h.o(p.f1180f0)) {
t9 e = y6Var.i.e();
if (!TextUtils.isEmpty(str2)) {
if (str2.contains("gclid") || str2.contains("utm_campaign") || str2.contains("utm_source") || str2.contains("utm_medium")) {
bundle = e.x(Uri.parse(str2.length() != 0 ? "https://google.com/search?".concat(str2) : new String("https://google.com/search?")));
if (bundle != null) {
bundle.putString("_cis", "referrer");
}
boolean z3 = true;
if (!z2) {
bundle2 = y6Var.i.e().x(uri);
if (bundle2 != null) {
bundle2.putString("_cis", "intent");
if (y6Var.i.a.h.o(p.f1179e0) && !bundle2.containsKey("gclid") && bundle != null && bundle.containsKey("gclid")) {
bundle2.putString("_cer", String.format("gclid=%s", bundle.getString("gclid")));
}
y6Var.i.H(str, "_cmp", bundle2);
if (y6Var.i.a.h.o(p.D0)) {
y6Var.i.n.a(str, bundle2);
}
}
} else {
bundle2 = null;
}
if (y6Var.i.a.h.o(p.f1181g0) && !y6Var.i.a.h.o(p.f1180f0) && bundle != null && bundle.containsKey("gclid") && (bundle2 == null || !bundle2.containsKey("gclid"))) {
y6Var.i.J("auto", "_lgclid", bundle.getString("gclid"));
}
if (TextUtils.isEmpty(str2)) {
y6Var.i.g().m.b("Activity created with referrer", str2);
if (y6Var.i.a.h.o(p.f1180f0)) {
if (bundle != null) {
y6Var.i.H(str, "_cmp", bundle);
if (y6Var.i.a.h.o(p.D0)) {
y6Var.i.n.a(str, bundle);
}
} else {
y6Var.i.g().m.b("Referrer does not contain valid parameters", str2);
}
y6Var.i.J("auto", "_ldl", null);
return;
}
if (!str2.contains("gclid") || (!str2.contains("utm_campaign") && !str2.contains("utm_source") && !str2.contains("utm_medium") && !str2.contains("utm_term") && !str2.contains("utm_content"))) {
z3 = false;
}
if (!z3) {
y6Var.i.g().m.a("Activity created with data 'referrer' without required params");
return;
} else if (!TextUtils.isEmpty(str2)) {
y6Var.i.J("auto", "_ldl", str2);
return;
} else {
return;
}
} else {
return;
}
} else {
e.g().m.a("Activity created with data 'referrer' without required params");
}
}
}
bundle = null;
boolean z3 = true;
if (!z2) {
}
y6Var.i.J("auto", "_lgclid", bundle.getString("gclid"));
if (TextUtils.isEmpty(str2)) {
}
} catch (Exception e2) {
y6Var.i.g().f.b("Throwable caught in handleReferrerForOnActivityCreated", e2);
}
}
}