package com.google.android.gms.internal.ads;

import java.util.Collections;
import java.util.Date;
import java.util.Iterator;

/* JADX INFO: loaded from: classes2.dex */
public final class ag1 implements dg1 {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final ag1 f8690e = new ag1(new eg1());

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public Date f8691a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public boolean f8692b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final eg1 f8693c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public boolean f8694d;

    public ag1(eg1 eg1Var) {
        this.f8693c = eg1Var;
    }

    @Override // com.google.android.gms.internal.ads.dg1
    public final void a(boolean z10) {
        if (!this.f8694d && z10) {
            Date date = new Date();
            Date date2 = this.f8691a;
            if (date2 == null || date.after(date2)) {
                this.f8691a = date;
                if (this.f8692b) {
                    Iterator it = Collections.unmodifiableCollection(cg1.f9890c.f9892b).iterator();
                    while (it.hasNext()) {
                        lg1 lg1Var = ((uf1) it.next()).f17230d;
                        Date date3 = this.f8691a;
                        lg1Var.f(date3 != null ? (Date) date3.clone() : null);
                    }
                }
            }
        }
        this.f8694d = z10;
    }
}
