CrackMe.apk
Download file
package com.google.common.util.concurrent;
import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;
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.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
@ElementTypesAreNonnullByDefault
abstract class WrappingExecutorService implements ExecutorService {
private final ExecutorService delegate;
/* access modifiers changed from: protected */
public abstract <T> Callable<T> wrapTask(Callable<T> callable);
protected WrappingExecutorService(ExecutorService executorService) {
this.delegate = (ExecutorService) Preconditions.checkNotNull(executorService);
}
/* access modifiers changed from: protected */
public Runnable wrapTask(Runnable runnable) {
final Callable wrapTask = wrapTask(Executors.callable(runnable, (Object) null));
return new Runnable(this) {
public void run() {
try {
wrapTask.call();
} catch (Exception e) {
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
}
}
};
}
private <T> ImmutableList<Callable<T>> wrapTasks(Collection<? extends Callable<T>> collection) {
ImmutableList.Builder builder = ImmutableList.builder();
for (Callable wrapTask : collection) {
builder.add((Object) wrapTask(wrapTask));
}
return builder.build();
}
public final void execute(Runnable runnable) {
this.delegate.execute(wrapTask(runnable));
}
public final <T> Future<T> submit(Callable<T> callable) {
return this.delegate.submit(wrapTask((Callable) Preconditions.checkNotNull(callable)));
}
public final Future<?> submit(Runnable runnable) {
return this.delegate.submit(wrapTask(runnable));
}
public final <T> Future<T> submit(Runnable runnable, @ParametricNullness T t) {
return this.delegate.submit(wrapTask(runnable), t);
}
public final <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> collection) throws InterruptedException {
return this.delegate.invokeAll(wrapTasks(collection));
}
public final <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> collection, long j, TimeUnit timeUnit) throws InterruptedException {
return this.delegate.invokeAll(wrapTasks(collection), j, timeUnit);
}
public final <T> T invokeAny(Collection<? extends Callable<T>> collection) throws InterruptedException, ExecutionException {
return this.delegate.invokeAny(wrapTasks(collection));
}
public final <T> T invokeAny(Collection<? extends Callable<T>> collection, long j, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException {
return this.delegate.invokeAny(wrapTasks(collection), j, timeUnit);
}
public final void shutdown() {
this.delegate.shutdown();
}
public final List<Runnable> shutdownNow() {
return this.delegate.shutdownNow();
}
public final boolean isShutdown() {
return this.delegate.isShutdown();
}
public final boolean isTerminated() {
return this.delegate.isTerminated();
}
public final boolean awaitTermination(long j, TimeUnit timeUnit) throws InterruptedException {
return this.delegate.awaitTermination(j, timeUnit);
}
}
Download file