package o.a.h.g;

import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicLong;

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

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final String f6073f;

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

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final boolean f6075n;

    public static final class a extends Thread {
        public a(Runnable runnable, String str) {
            super(runnable, str);
        }
    }

    public g(String str) {
        this.f6073f = str;
        this.f6074m = 5;
        this.f6075n = false;
    }

    public g(String str, int i2, boolean z2) {
        this.f6073f = str;
        this.f6074m = i2;
        this.f6075n = z2;
    }

    @Override // java.util.concurrent.ThreadFactory
    public Thread newThread(Runnable runnable) {
        String str = this.f6073f + '-' + incrementAndGet();
        Thread aVar = this.f6075n ? new a(runnable, str) : new Thread(runnable, str);
        aVar.setPriority(this.f6074m);
        aVar.setDaemon(true);
        return aVar;
    }

    @Override // java.util.concurrent.atomic.AtomicLong
    public String toString() {
        return g.a.a.a.a.A(g.a.a.a.a.F("RxThreadFactory["), this.f6073f, "]");
    }

    public g(String str, int i2) {
        this.f6073f = str;
        this.f6074m = i2;
        this.f6075n = false;
    }
}
