97 lines
4.2 KiB
Java
97 lines
4.2 KiB
Java
package c.i.a.f.i.b;
|
|
|
|
import android.content.ServiceConnection;
|
|
import android.net.Uri;
|
|
import android.os.Bundle;
|
|
import c.i.a.f.e.n.a;
|
|
import c.i.a.f.h.l.e2;
|
|
import c.i.a.f.h.l.g9;
|
|
import c.i.a.f.h.l.j9;
|
|
/* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */
|
|
public final class o4 implements Runnable {
|
|
public final /* synthetic */ e2 i;
|
|
public final /* synthetic */ ServiceConnection j;
|
|
public final /* synthetic */ l4 k;
|
|
|
|
public o4(l4 l4Var, e2 e2Var, ServiceConnection serviceConnection) {
|
|
this.k = l4Var;
|
|
this.i = e2Var;
|
|
this.j = serviceConnection;
|
|
}
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:13:0x005f */
|
|
/* JADX WARNING: Removed duplicated region for block: B:52:0x0185 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:54:? A[RETURN, SYNTHETIC] */
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
Bundle bundle;
|
|
l4 l4Var = this.k;
|
|
m4 m4Var = l4Var.j;
|
|
String str = l4Var.i;
|
|
e2 e2Var = this.i;
|
|
ServiceConnection serviceConnection = this.j;
|
|
m4Var.a.f().b();
|
|
if (e2Var == null) {
|
|
m4Var.a.g().i.a("Attempting to use Install Referrer Service while it is not initialized");
|
|
} else {
|
|
Bundle bundle2 = new Bundle();
|
|
bundle2.putString("package_name", str);
|
|
try {
|
|
bundle = e2Var.f(bundle2);
|
|
if (bundle == null) {
|
|
m4Var.a.g().f.a("Install Referrer Service returned a null response");
|
|
}
|
|
} catch (Exception e) {
|
|
m4Var.a.g().f.b("Exception occurred while retrieving the Install Referrer", e.getMessage());
|
|
}
|
|
m4Var.a.f().b();
|
|
if (bundle != null) {
|
|
long j = bundle.getLong("install_begin_timestamp_seconds", 0) * 1000;
|
|
if (j == 0) {
|
|
m4Var.a.g().i.a("Service response is missing Install Referrer install timestamp");
|
|
} else {
|
|
String string = bundle.getString("install_referrer");
|
|
if (string == null || string.isEmpty()) {
|
|
m4Var.a.g().f.a("No referrer defined in Install Referrer response");
|
|
} else {
|
|
m4Var.a.g().n.b("InstallReferrer API result", string);
|
|
Bundle x2 = m4Var.a.t().x(Uri.parse(string.length() != 0 ? "?".concat(string) : new String("?")));
|
|
if (x2 == null) {
|
|
m4Var.a.g().f.a("No campaign params defined in Install Referrer result");
|
|
} else {
|
|
String string2 = x2.getString("medium");
|
|
if (string2 != null && !"(not set)".equalsIgnoreCase(string2) && !"organic".equalsIgnoreCase(string2)) {
|
|
long j2 = bundle.getLong("referrer_click_timestamp_seconds", 0) * 1000;
|
|
if (j2 == 0) {
|
|
m4Var.a.g().f.a("Install Referrer is missing click timestamp for ad campaign");
|
|
} else {
|
|
x2.putLong("click_timestamp", j2);
|
|
}
|
|
}
|
|
if (j == m4Var.a.o().l.a()) {
|
|
m4Var.a.g().n.a("Install Referrer campaign has already been logged");
|
|
} else if (!((j9) g9.i.a()).a() || !m4Var.a.h.o(p.t0) || m4Var.a.d()) {
|
|
m4Var.a.o().l.b(j);
|
|
m4Var.a.g().n.b("Logging Install Referrer campaign from sdk with ", "referrer API");
|
|
x2.putString("_cis", "referrer API");
|
|
m4Var.a.s().H("auto", "_cmp", x2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (serviceConnection == null) {
|
|
a.b().c(m4Var.a.b, serviceConnection);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
bundle = null;
|
|
m4Var.a.f().b();
|
|
if (bundle != null) {
|
|
}
|
|
if (serviceConnection == null) {
|
|
}
|
|
}
|
|
}
|