package defpackage;

import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.WeakHashMap;

/* JADX INFO: loaded from: classes.dex */
public class g18 {
    public final Set a = Collections.newSetFromMap(new WeakHashMap());
    public final HashSet b = new HashSet();
    public boolean c;

    public final boolean a(j08 j08Var) {
        boolean z = true;
        if (j08Var == null) {
            return true;
        }
        boolean zRemove = this.a.remove(j08Var);
        if (!this.b.remove(j08Var) && !zRemove) {
            z = false;
        }
        if (z) {
            j08Var.clear();
        }
        return z;
    }

    public final String toString() {
        return super.toString() + "{numRequests=" + this.a.size() + ", isPaused=" + this.c + "}";
    }
}
