package com.google.firebase.concurrent; import java.util.Collection; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes3.dex */ public final class PausableExecutorServiceImpl implements PausableExecutorService { private final ExecutorService delegateService; private final PausableExecutor pausableDelegate; public PausableExecutorServiceImpl(boolean z3, ExecutorService executorService) { this.delegateService = executorService; this.pausableDelegate = new PausableExecutorImpl(z3, executorService); } public static /* synthetic */ Object lambda$submit$0(Runnable runnable, Object obj) throws Exception { runnable.run(); return obj; } public static /* synthetic */ Object lambda$submit$1(Runnable runnable) throws Exception { runnable.run(); return null; } @Override // java.util.concurrent.ExecutorService public boolean awaitTermination(long j4, TimeUnit timeUnit) throws InterruptedException { return this.delegateService.awaitTermination(j4, timeUnit); } @Override // java.util.concurrent.Executor public void execute(Runnable runnable) { this.pausableDelegate.execute(runnable); } @Override // java.util.concurrent.ExecutorService public List> invokeAll(Collection> collection) throws InterruptedException { return this.delegateService.invokeAll(collection); } @Override // java.util.concurrent.ExecutorService public T invokeAny(Collection> collection) throws ExecutionException, InterruptedException { return (T) this.delegateService.invokeAny(collection); } @Override // com.google.firebase.concurrent.PausableExecutor public boolean isPaused() { return this.pausableDelegate.isPaused(); } @Override // java.util.concurrent.ExecutorService public boolean isShutdown() { return this.delegateService.isShutdown(); } @Override // java.util.concurrent.ExecutorService public boolean isTerminated() { return this.delegateService.isTerminated(); } @Override // com.google.firebase.concurrent.PausableExecutor public void pause() { this.pausableDelegate.pause(); } @Override // com.google.firebase.concurrent.PausableExecutor public void resume() { this.pausableDelegate.resume(); } @Override // java.util.concurrent.ExecutorService public void shutdown() { throw new UnsupportedOperationException("Shutting down is not allowed."); } @Override // java.util.concurrent.ExecutorService public List shutdownNow() { throw new UnsupportedOperationException("Shutting down is not allowed."); } @Override // java.util.concurrent.ExecutorService public Future submit(Callable callable) { FutureTask futureTask = new FutureTask(callable); execute(futureTask); return futureTask; } @Override // java.util.concurrent.ExecutorService public List> invokeAll(Collection> collection, long j4, TimeUnit timeUnit) throws InterruptedException { return this.delegateService.invokeAll(collection, j4, timeUnit); } @Override // java.util.concurrent.ExecutorService public T invokeAny(Collection> collection, long j4, TimeUnit timeUnit) throws ExecutionException, InterruptedException, TimeoutException { return (T) this.delegateService.invokeAny(collection, j4, timeUnit); } @Override // java.util.concurrent.ExecutorService public Future submit(Runnable runnable, T t2) { return submit(new i(runnable, t2, 1)); } @Override // java.util.concurrent.ExecutorService public Future submit(Runnable runnable) { return submit(new h(runnable, 1)); } }