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

import android.content.Context;
import android.view.View;
import java.util.Set;
import java.util.WeakHashMap;

/* JADX INFO: loaded from: classes2.dex */
public final class bk0 extends rc2 implements kj {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final WeakHashMap f9559b;

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final wa1 f9561d;

    public bk0(Context context, Set set, wa1 wa1Var) {
        super(set);
        this.f9559b = new WeakHashMap(1);
        this.f9560c = context;
        this.f9561d = wa1Var;
    }

    public final synchronized void I0(View view) {
        lj ljVar;
        try {
            WeakHashMap weakHashMap = this.f9559b;
            ljVar = (lj) weakHashMap.get(view);
            if (ljVar == null) {
                lj ljVar2 = new lj(this.f9560c, view);
                ljVar2.f13728k.add(this);
                ljVar2.d(3);
                weakHashMap.put(view, ljVar2);
                ljVar = ljVar2;
            }
        } catch (Throwable th) {
            throw th;
        }
        if (this.f9561d.U) {
            tn tnVar = ao.M1;
            n7.y yVar = n7.y.f31093e;
            if (((Boolean) yVar.f31096c.b(tnVar)).booleanValue()) {
                long jLongValue = ((Long) yVar.f31096c.b(ao.L1)).longValue();
                p7.b0 b0Var = ljVar.f13725h;
                synchronized (b0Var.f31655c) {
                    b0Var.f31653a = jLongValue;
                }
                return;
            }
            throw th;
        }
        p7.b0 b0Var2 = ljVar.f13725h;
        long j10 = lj.Q;
        synchronized (b0Var2.f31655c) {
            b0Var2.f31653a = j10;
        }
    }

    @Override // com.google.android.gms.internal.ads.kj
    public final synchronized void p(jj jjVar) {
        H0(new dh0(jjVar, 2));
    }
}
