package p138.p176.p177.p242.p265.p266;

import android.os.Bundle;
import android.os.SystemClock;
import p138.p176.p177.p242.p246.p253.C4312;
import p138.p176.p177.p242.p258.p263.C4391;
import p138.p176.p177.p242.p258.p263.C4412;
import p138.p176.p177.p242.p258.p263.C4464;
import p138.p176.p177.p242.p258.p263.InterfaceC4541;

/* JADX INFO: renamed from: ދ.ހ.֏.ހ.ބ.֏.ڈ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C4884 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public long f14689;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public long f14690;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final AbstractC4905 f14691;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final /* synthetic */ C4943 f14692;

    public C4884(C4943 c4943) {
        this.f14692 = c4943;
        this.f14691 = new C4834(this, this.f14692.f14588);
        if (((C4312) c4943.f14588.f15022) == null) {
            throw null;
        }
        long jElapsedRealtime = SystemClock.elapsedRealtime();
        this.f14689 = jElapsedRealtime;
        this.f14690 = jElapsedRealtime;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final long m8209() {
        if (((C4312) this.f14692.f14588.f15022) == null) {
            throw null;
        }
        long jElapsedRealtime = SystemClock.elapsedRealtime();
        long j = jElapsedRealtime - this.f14690;
        this.f14690 = jElapsedRealtime;
        return j;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final boolean m8210(boolean z, boolean z2, long j) {
        this.f14692.mo8008();
        this.f14692.m8066();
        if (!C4391.m7290() || !this.f14692.f14588.f15015.m8177(C4915.f14908)) {
            if (((C4312) this.f14692.f14588.f15022) == null) {
                throw null;
            }
            j = SystemClock.elapsedRealtime();
        }
        if (!C4464.m7476() || !this.f14692.f14588.f15015.m8177(C4915.f14904) || this.f14692.f14588.m8495()) {
            C4898 c4898 = this.f14692.m8168().f14665;
            if (((C4312) this.f14692.f14588.f15022) == null) {
                throw null;
            }
            c4898.m8317(System.currentTimeMillis());
        }
        long jM8209 = j - this.f14689;
        if (!z && jM8209 < 1000) {
            this.f14692.mo8165().f14452.m8035("Screen exposed for less than 1000 ms. Event not sent. time", Long.valueOf(jM8209));
            return false;
        }
        if (this.f14692.f14588.f15015.m8177(C4915.f14874) && !z2) {
            if (((InterfaceC4541) C4412.f13704.mo7259()).mo7265() && this.f14692.f14588.f15015.m8177(C4915.f14876) && C4391.m7290() && this.f14692.f14588.f15015.m8177(C4915.f14908)) {
                jM8209 = j - this.f14690;
                this.f14690 = j;
            } else {
                jM8209 = m8209();
            }
        }
        this.f14692.mo8165().f14452.m8035("Recording user engagement, ms", Long.valueOf(jM8209));
        Bundle bundle = new Bundle();
        bundle.putLong("_et", jM8209);
        C4765.m7988(this.f14692.m8061().m7989(!this.f14692.f14588.f15015.m8190().booleanValue()), bundle, true);
        if (this.f14692.f14588.f15015.m8177(C4915.f14874) && !this.f14692.f14588.f15015.m8177(C4915.f14875) && z2) {
            bundle.putLong("_fr", 1L);
        }
        if (!this.f14692.f14588.f15015.m8177(C4915.f14875) || !z2) {
            this.f14692.m8058().m7972("auto", "_e", bundle);
        }
        this.f14689 = j;
        this.f14691.m8362();
        this.f14691.m8361(3600000L);
        return true;
    }
}
