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

import android.os.SystemClock;
import java.util.ArrayList;
import java.util.HashMap;

/* JADX INFO: loaded from: classes2.dex */
public final class jr0 {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final String f12997e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final gr0 f12998f;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final ArrayList f12994b = new ArrayList();

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f12995c = false;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final p7.o0 f12993a = m7.n.C.f30469h.g();

    public jr0(String str, gr0 gr0Var) {
        this.f12997e = str;
        this.f12998f = gr0Var;
    }

    public final synchronized void a(String str) {
        if (((Boolean) n7.y.f31093e.f31096c.b(ao.f9129w2)).booleanValue()) {
            HashMap mapE = e();
            mapE.put("action", "adapter_init_started");
            mapE.put("ancn", str);
            this.f12994b.add(mapE);
        }
    }

    public final synchronized void b(String str) {
        if (((Boolean) n7.y.f31093e.f31096c.b(ao.f9129w2)).booleanValue()) {
            HashMap mapE = e();
            mapE.put("action", "adapter_init_finished");
            mapE.put("ancn", str);
            this.f12994b.add(mapE);
        }
    }

    public final synchronized void c(String str, String str2) {
        if (((Boolean) n7.y.f31093e.f31096c.b(ao.f9129w2)).booleanValue()) {
            HashMap mapE = e();
            mapE.put("action", "adapter_init_finished");
            mapE.put("ancn", str);
            mapE.put("rqe", str2);
            this.f12994b.add(mapE);
        }
    }

    public final synchronized void d() {
        if (((Boolean) n7.y.f31093e.f31096c.b(ao.f9129w2)).booleanValue() && !this.f12995c) {
            HashMap mapE = e();
            mapE.put("action", "init_started");
            this.f12994b.add(mapE);
            this.f12995c = true;
        }
    }

    public final HashMap e() {
        gr0 gr0Var = this.f12998f;
        gr0Var.getClass();
        HashMap map = new HashMap(gr0Var.f12608a);
        m7.n.C.f30472k.getClass();
        map.put("tms", Long.toString(SystemClock.elapsedRealtime(), 10));
        map.put("tid", this.f12993a.C() ? "" : this.f12997e);
        return map;
    }
}
