package B1;

import I2.K;
import android.os.Handler;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.RejectedExecutionException;

/* JADX INFO: loaded from: classes.dex */
public final class e implements Executor {

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

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

    public /* synthetic */ e(Object obj, int i6) {
        this.f444a = i6;
        this.f445b = obj;
    }

    @Override // java.util.concurrent.Executor
    public final void execute(Runnable runnable) {
        switch (this.f444a) {
            case 0:
                runnable.getClass();
                Handler handler = (Handler) this.f445b;
                if (handler.post(runnable)) {
                    return;
                }
                throw new RejectedExecutionException(handler + " is shutting down");
            case 1:
                runnable.getClass();
                Handler handler2 = (Handler) this.f445b;
                if (handler2.post(runnable)) {
                    return;
                }
                throw new RejectedExecutionException(handler2 + " is shutting down");
            default:
                ((ExecutorService) this.f445b).execute(new K(runnable, 19));
                return;
        }
    }

    public e(Handler handler) {
        this.f444a = 1;
        handler.getClass();
        this.f445b = handler;
    }
}
