package o; import android.os.Handler; import android.os.Process; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; /* loaded from: classes.dex */ final class CLP { /* JADX INFO: Access modifiers changed from: package-private */ public static T b(ExecutorService executorService, Callable callable, int i) throws InterruptedException { try { return executorService.submit(callable).get(i, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { throw e; } catch (ExecutionException e2) { throw new RuntimeException(e2); } catch (TimeoutException unused) { throw new InterruptedException("timeout"); } } /* loaded from: classes.dex */ static class RVV implements Runnable { private Handler c; private QUU d; private Callable e; /* JADX INFO: Access modifiers changed from: package-private */ public RVV(Handler handler, Callable callable, QUU quu) { this.e = callable; this.d = quu; this.c = handler; } @Override // java.lang.Runnable public final void run() { T t; try { t = this.e.call(); } catch (Exception unused) { t = null; } this.c.post(new Runnable(this, this.d, t) { // from class: o.CLP.RVV.3 final Object a; final QUU b; final RVV d; { this.d = this; this.b = r2; this.a = t; } /* JADX WARN: Multi-variable type inference failed */ @Override // java.lang.Runnable public final void run() { this.b.accept(this.a); } }); } } /* loaded from: classes.dex */ static class LWm implements ThreadFactory { private String b; private int c = 10; /* JADX INFO: Access modifiers changed from: package-private */ public LWm(String str) { this.b = str; } @Override // java.util.concurrent.ThreadFactory public final Thread newThread(Runnable runnable) { return new HBt(runnable, this.b, this.c); } /* loaded from: classes.dex */ static class HBt extends Thread { private final int a; HBt(Runnable runnable, String str, int i) { super(runnable, str); this.a = i; } @Override // java.lang.Thread, java.lang.Runnable public final void run() { Process.setThreadPriority(this.a); super.run(); } } } }