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

import android.content.Context;
import android.util.Base64;
import java.util.concurrent.atomic.AtomicReference;

/* JADX INFO: loaded from: classes2.dex */
public final class wh extends li {

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public static final hs1 f18058i = new hs1(2);

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

    public wh(mh mhVar, we weVar, int i10, Context context) {
        super(mhVar, "BJ0iIx7YCr6PyW+pyNNozQaB62BBi5nixFl6WJUaFdU4X2GlfptGfOLgFJ7ri6Ag", "ovMA5nrmsfMPPc1p4911nPRjAFxE4I+3QWZwZMrn+uQ=", weVar, i10, 29);
        this.f18059h = context;
    }

    @Override // com.google.android.gms.internal.ads.li
    public final void a() {
        we weVar = this.f13703d;
        weVar.c();
        ((pf) weVar.f8617b).B("E");
        Context context = this.f18059h;
        AtomicReference atomicReferenceA = f18058i.a(context.getPackageName());
        if (atomicReferenceA.get() == null) {
            synchronized (atomicReferenceA) {
                try {
                    if (atomicReferenceA.get() == null) {
                        atomicReferenceA.set((String) this.f13704e.invoke(null, context));
                    }
                } finally {
                }
            }
        }
        String str = (String) atomicReferenceA.get();
        we weVar2 = this.f13703d;
        synchronized (weVar2) {
            String strEncodeToString = Base64.encodeToString(str.getBytes(), 11);
            weVar2.c();
            ((pf) weVar2.f8617b).B(strEncodeToString);
        }
    }
}
