package o;

import android.os.Bundle;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.ou0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2098ou0 {
    public long a;
    public long b;
    public final C1813lu0 c;
    public final /* synthetic */ C2382ru0 d;

    public C2098ou0(C2382ru0 c2382ru0) {
        this.d = c2382ru0;
        Kr0 kr0 = (Kr0) c2382ru0.a;
        this.c = new C1813lu0(this, kr0, 0);
        long jElapsedRealtime = kr0.k.elapsedRealtime();
        this.a = jElapsedRealtime;
        this.b = jElapsedRealtime;
    }

    public final boolean a(boolean z, boolean z2, long j) {
        C2382ru0 c2382ru0 = this.d;
        c2382ru0.r();
        c2382ru0.t();
        Kr0 kr0 = (Kr0) c2382ru0.a;
        boolean zA = kr0.a();
        Nq0 nq0 = kr0.f;
        if (zA) {
            C1617jr0 c1617jr0 = kr0.e;
            Kr0.j(c1617jr0);
            c1617jr0.p.b(kr0.k.currentTimeMillis());
        }
        long j2 = j - this.a;
        if (!z && j2 < 1000) {
            Kr0.l(nq0);
            nq0.n.c(Long.valueOf(j2), "Screen exposed for less than 1000 ms. Event not sent. time");
            return false;
        }
        if (!z2) {
            j2 = j - this.b;
            this.b = j;
        }
        Kr0.l(nq0);
        nq0.n.c(Long.valueOf(j2), "Recording user engagement, ms");
        Bundle bundle = new Bundle();
        bundle.putLong("_et", j2);
        boolean z3 = !kr0.d.G();
        C2191pt0 c2191pt0 = kr0.l;
        Kr0.k(c2191pt0);
        C2574tv0.i0(c2191pt0.y(z3), bundle, true);
        if (!z2) {
            Xs0 xs0 = kr0.m;
            Kr0.k(xs0);
            xs0.z("auto", "_e", bundle);
        }
        this.a = j;
        C1813lu0 c1813lu0 = this.c;
        c1813lu0.c();
        c1813lu0.b(((Long) AbstractC1900mq0.q0.a(null)).longValue());
        return true;
    }
}
