package androidx.emoji2.text;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.ArrayList;
import java.util.Collection;

/* JADX INFO: loaded from: classes.dex */
public final class p implements Runnable {

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

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

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

    public p(@NonNull Collection<o> collection, int i10, @Nullable Throwable th) {
        p0.g.checkNotNull(collection, "initCallbacks cannot be null");
        this.f2255a = new ArrayList(collection);
        this.f2257c = i10;
        this.f2256b = th;
    }

    @Override // java.lang.Runnable
    public final void run() {
        ArrayList arrayList = this.f2255a;
        int size = arrayList.size();
        int i10 = 0;
        if (this.f2257c != 1) {
            while (i10 < size) {
                ((o) arrayList.get(i10)).onFailed(this.f2256b);
                i10++;
            }
        } else {
            while (i10 < size) {
                ((o) arrayList.get(i10)).a();
                i10++;
            }
        }
    }
}
