76 lines
2.4 KiB
Java
76 lines
2.4 KiB
Java
package c.i.a.f.i.b;
|
|
|
|
import android.os.Bundle;
|
|
import android.os.SystemClock;
|
|
import androidx.annotation.WorkerThread;
|
|
import c.i.a.f.e.o.d;
|
|
import c.i.a.f.h.l.r9;
|
|
import c.i.a.f.h.l.s9;
|
|
import c.i.a.f.h.l.v9;
|
|
import java.util.Objects;
|
|
/* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */
|
|
public final class d9 {
|
|
public long a;
|
|
public long b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final i f1148c;
|
|
public final /* synthetic */ w8 d;
|
|
|
|
public d9(w8 w8Var) {
|
|
this.d = w8Var;
|
|
this.f1148c = new c9(this, w8Var.a);
|
|
Objects.requireNonNull((d) w8Var.a.o);
|
|
long elapsedRealtime = SystemClock.elapsedRealtime();
|
|
this.a = elapsedRealtime;
|
|
this.b = elapsedRealtime;
|
|
}
|
|
|
|
@WorkerThread
|
|
public final boolean a(boolean z2, boolean z3, long j) {
|
|
this.d.b();
|
|
this.d.t();
|
|
if (!r9.b() || !this.d.a.h.o(p.q0) || this.d.a.d()) {
|
|
h4 h4Var = this.d.l().v;
|
|
Objects.requireNonNull((d) this.d.a.o);
|
|
h4Var.b(System.currentTimeMillis());
|
|
}
|
|
long j2 = j - this.a;
|
|
if (z2 || j2 >= 1000) {
|
|
if (this.d.a.h.o(p.T) && !z3) {
|
|
if (!((v9) s9.i.a()).a() || !this.d.a.h.o(p.V)) {
|
|
j2 = b();
|
|
} else {
|
|
j2 = j - this.b;
|
|
this.b = j;
|
|
}
|
|
}
|
|
this.d.g().n.b("Recording user engagement, ms", Long.valueOf(j2));
|
|
Bundle bundle = new Bundle();
|
|
bundle.putLong("_et", j2);
|
|
h7.A(this.d.q().w(!this.d.a.h.z().booleanValue()), bundle, true);
|
|
if (this.d.a.h.o(p.T) && !this.d.a.h.o(p.U) && z3) {
|
|
bundle.putLong("_fr", 1);
|
|
}
|
|
if (!this.d.a.h.o(p.U) || !z3) {
|
|
this.d.n().H("auto", "_e", bundle);
|
|
}
|
|
this.a = j;
|
|
this.f1148c.c();
|
|
this.f1148c.b(3600000);
|
|
return true;
|
|
}
|
|
this.d.g().n.b("Screen exposed for less than 1000 ms. Event not sent. time", Long.valueOf(j2));
|
|
return false;
|
|
}
|
|
|
|
@WorkerThread
|
|
public final long b() {
|
|
Objects.requireNonNull((d) this.d.a.o);
|
|
long elapsedRealtime = SystemClock.elapsedRealtime();
|
|
long j = elapsedRealtime - this.b;
|
|
this.b = elapsedRealtime;
|
|
return j;
|
|
}
|
|
}
|