package m4;

import android.util.Log;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/* JADX INFO: renamed from: m4.o, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1179o {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final ArrayList f14641a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f14642b;

    public C1179o() {
        this.f14641a = new ArrayList();
        this.f14642b = 128;
    }

    public synchronized List a() {
        return Collections.unmodifiableList(new ArrayList(this.f14641a));
    }

    public boolean b() {
        return this.f14642b < this.f14641a.size();
    }

    public synchronized boolean c(List list) {
        this.f14641a.clear();
        if (list.size() <= this.f14642b) {
            return this.f14641a.addAll(list);
        }
        Log.w("FirebaseCrashlytics", "Ignored 0 entries when adding rollout assignments. Maximum allowable: " + this.f14642b, null);
        return this.f14641a.addAll(list.subList(0, this.f14642b));
    }

    public C1179o(ArrayList arrayList) {
        this.f14641a = arrayList;
    }
}
