package com.google.android.gms.measurement.internal; import android.os.Bundle; import androidx.annotation.VisibleForTesting; import androidx.annotation.WorkerThread; /* loaded from: classes3.dex */ final class zzmr { @VisibleForTesting protected long zza; final /* synthetic */ zzml zzb; @VisibleForTesting private long zzc; private final zzav zzd; @VisibleForTesting @WorkerThread public final long zza(long j) { long j2 = j - this.zza; this.zza = j; return j2; } public static /* synthetic */ void zza(zzmr zzmrVar) { zzmrVar.zzb.zzt(); zzmrVar.zza(false, false, zzmrVar.zzb.zzb().elapsedRealtime()); zzmrVar.zzb.zzc().zza(zzmrVar.zzb.zzb().elapsedRealtime()); } public zzmr(zzml zzmlVar) { this.zzb = zzmlVar; this.zzd = new zzmq(this, zzmlVar.zzu); long elapsedRealtime = zzmlVar.zzb().elapsedRealtime(); this.zzc = elapsedRealtime; this.zza = elapsedRealtime; } public final void zza() { this.zzd.zza(); if (this.zzb.zze().zza(zzbh.zzde)) { this.zzc = this.zzb.zzb().elapsedRealtime(); } else { this.zzc = 0L; } this.zza = this.zzc; } @WorkerThread public final void zzb(long j) { this.zzd.zza(); } @WorkerThread public final void zzc(long j) { this.zzb.zzt(); this.zzd.zza(); this.zzc = j; this.zza = j; } @WorkerThread public final boolean zza(boolean z, boolean z2, long j) { this.zzb.zzt(); this.zzb.zzu(); if (this.zzb.zzu.zzac()) { this.zzb.zzk().zzk.zza(this.zzb.zzb().currentTimeMillis()); } long j2 = j - this.zzc; if (!z && j2 < 1000) { this.zzb.zzj().zzp().zza("Screen exposed for less than 1000 ms. Event not sent. time", Long.valueOf(j2)); return false; } if (!z2) { j2 = zza(j); } this.zzb.zzj().zzp().zza("Recording user engagement, ms", Long.valueOf(j2)); Bundle bundle = new Bundle(); bundle.putLong("_et", j2); zznt.zza(this.zzb.zzn().zza(!this.zzb.zze().zzv()), bundle, true); if (!z2) { this.zzb.zzm().zzc("auto", "_e", bundle); } this.zzc = j; this.zzd.zza(); this.zzd.zza(zzbh.zzba.zza(null).longValue()); return true; } }