package com.vungle.warren; import java.util.concurrent.ExecutorService; import java.util.concurrent.atomic.AtomicReference; /* loaded from: classes2.dex */ public class z { /* renamed from: c, reason: collision with root package name */ private static final AtomicReference f8667c = new AtomicReference(); /* renamed from: d, reason: collision with root package name */ private static final AtomicReference f8668d = new AtomicReference(); /* renamed from: e, reason: collision with root package name */ private static z f8669e; /* renamed from: a, reason: collision with root package name */ private g8.j f8670a; /* renamed from: b, reason: collision with root package name */ private ExecutorService f8671b; class a implements Runnable { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ Boolean f8672a; a(Boolean bool) { this.f8672a = bool; } @Override // java.lang.Runnable public void run() { com.vungle.warren.utility.f.b(z.this.f8670a, "coppa_cookie", "is_coppa", this.f8672a); } } public enum b { COPPA_ENABLED(Boolean.TRUE), COPPA_DISABLED(Boolean.FALSE), COPPA_NOTSET(null); /* renamed from: a, reason: collision with root package name */ private Boolean f8678a; b(Boolean bool) { this.f8678a = bool; } public boolean a() { Boolean bool = this.f8678a; if (bool == null) { return true; } return bool.booleanValue(); } } private z() { } private void b() { this.f8670a.v(com.vungle.warren.model.c.class); this.f8670a.v(com.vungle.warren.model.e.class); } protected static synchronized z d() { z zVar; synchronized (z.class) { if (f8669e == null) { f8669e = new z(); } zVar = f8669e; } return zVar; } protected b c() { AtomicReference atomicReference = f8667c; return (atomicReference == null || atomicReference.get() == null) ? b.COPPA_NOTSET : ((Boolean) atomicReference.get()).booleanValue() ? b.COPPA_ENABLED : !((Boolean) atomicReference.get()).booleanValue() ? b.COPPA_DISABLED : b.COPPA_NOTSET; } protected synchronized void e(ExecutorService executorService, g8.j jVar) { this.f8670a = jVar; this.f8671b = executorService; Boolean a10 = com.vungle.warren.utility.f.a(jVar, "coppa_cookie", "is_coppa"); AtomicReference atomicReference = f8667c; if (atomicReference.get() != null) { g((Boolean) atomicReference.get()); } else if (a10 != null) { atomicReference.set(a10); } } protected boolean f() { AtomicReference atomicReference = f8668d; if (atomicReference == null || atomicReference.get() == null) { return false; } return !((Boolean) atomicReference.get()).booleanValue(); } protected void g(Boolean bool) { ExecutorService executorService; if (bool != null) { f8667c.set(bool); if (this.f8670a == null || (executorService = this.f8671b) == null) { return; } executorService.execute(new a(bool)); } } protected void h(boolean z10) { f8668d.set(Boolean.valueOf(z10)); g8.j jVar = this.f8670a; if (jVar == null) { return; } Boolean a10 = com.vungle.warren.utility.f.a(jVar, "coppa_cookie", "disable_ad_id"); if ((a10 == null || !a10.booleanValue()) && z10) { b(); } com.vungle.warren.utility.f.b(this.f8670a, "coppa_cookie", "disable_ad_id", Boolean.valueOf(z10)); } }