package o;

import android.os.Process;
import android.util.Log;
import java.util.Locale;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.bx, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class RunnableC0864bx implements Runnable {
    public final /* synthetic */ int l = 0;
    public final /* synthetic */ Object m;

    public RunnableC0864bx(Runnable runnable) {
        this.m = runnable;
    }

    @Override // java.lang.Runnable
    public final void run() throws SecurityException, IllegalArgumentException {
        Process.setThreadPriority(10);
        switch (this.l) {
            case 0:
                ((Runnable) this.m).run();
                break;
            default:
                ExecutorService executorService = (ExecutorService) this.m;
                try {
                    Log.isLoggable("FirebaseCrashlytics", 3);
                    executorService.shutdown();
                    if (!executorService.awaitTermination(2L, TimeUnit.SECONDS)) {
                        Log.isLoggable("FirebaseCrashlytics", 3);
                        executorService.shutdownNow();
                        break;
                    }
                } catch (InterruptedException unused) {
                    Locale locale = Locale.US;
                    Log.isLoggable("FirebaseCrashlytics", 3);
                    executorService.shutdownNow();
                    return;
                }
                break;
        }
    }

    public RunnableC0864bx(ExecutorService executorService) {
        TimeUnit timeUnit = TimeUnit.SECONDS;
        this.m = executorService;
    }
}
