package n0;

import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;

/* JADX INFO: loaded from: classes.dex */
public final class o implements ThreadFactory {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f30754a;

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

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

    public /* synthetic */ o(Object obj, int i10) {
        this.f30754a = i10;
        this.f30756c = obj;
        this.f30755b = 0;
    }

    @Override // java.util.concurrent.ThreadFactory
    public final Thread newThread(Runnable runnable) {
        switch (this.f30754a) {
            case 0:
                return new n(this.f30755b, (String) this.f30756c, runnable);
            case 1:
                Thread threadNewThread = Executors.defaultThreadFactory().newThread(runnable);
                threadNewThread.setName("WorkManager-WorkTimer-thread-" + this.f30755b);
                this.f30755b = this.f30755b + 1;
                return threadNewThread;
            default:
                Thread thread = new Thread(runnable);
                StringBuilder sb = new StringBuilder("flutter-worker-");
                int i10 = this.f30755b;
                this.f30755b = i10 + 1;
                sb.append(i10);
                thread.setName(sb.toString());
                return thread;
        }
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ o(wc.a aVar) {
        this(aVar, 2);
        this.f30754a = 2;
    }

    public o() {
        this.f30754a = 0;
        this.f30756c = "fonts-androidx";
        this.f30755b = 10;
    }
}
