- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
93 lines
2.7 KiB
Java
93 lines
2.7 KiB
Java
package com.fyber.inneractive.sdk.util;
|
|
|
|
import android.os.Handler;
|
|
import android.os.Looper;
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.concurrent.Executors;
|
|
import java.util.concurrent.RejectedExecutionException;
|
|
import java.util.concurrent.ThreadFactory;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public abstract class b<Params, Progress, Result> {
|
|
public d c;
|
|
public c d;
|
|
public Handler b = null;
|
|
public final Object e = new Object();
|
|
public boolean f = false;
|
|
public final ExecutorService a = Executors.newSingleThreadExecutor(new a());
|
|
|
|
public class a implements ThreadFactory {
|
|
@Override // java.util.concurrent.ThreadFactory
|
|
public final Thread newThread(Runnable runnable) {
|
|
Thread thread = new Thread(runnable);
|
|
thread.setDaemon(true);
|
|
return thread;
|
|
}
|
|
}
|
|
|
|
/* renamed from: com.fyber.inneractive.sdk.util.b$b, reason: collision with other inner class name */
|
|
public class RunnableC0109b implements Runnable {
|
|
public final /* synthetic */ Object[] a;
|
|
|
|
public RunnableC0109b(Object[] objArr) {
|
|
this.a = objArr;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
b.this.getClass();
|
|
b bVar = b.this;
|
|
boolean z = bVar.f;
|
|
if (z) {
|
|
return;
|
|
}
|
|
c cVar = new c(bVar, this.a);
|
|
bVar.d = cVar;
|
|
if (z) {
|
|
return;
|
|
}
|
|
try {
|
|
bVar.a.execute(cVar);
|
|
} catch (NullPointerException e) {
|
|
IAlog.f("AsyncTaskExecutor : execute(): Unable to execute the null task: %s", e.getMessage());
|
|
} catch (RejectedExecutionException e2) {
|
|
IAlog.f("AsyncTaskExecutor : execute(): Unable to execute the task: %s", e2.getMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
public abstract Result a(Params... paramsArr);
|
|
|
|
public abstract void a(Result result);
|
|
|
|
public final boolean a() {
|
|
return this.a.isTerminated() || this.a.isShutdown();
|
|
}
|
|
|
|
public final void b(Params... paramsArr) {
|
|
if (this.b == null) {
|
|
synchronized (this.e) {
|
|
this.b = new Handler(Looper.getMainLooper());
|
|
}
|
|
}
|
|
this.b.post(new RunnableC0109b(paramsArr));
|
|
}
|
|
|
|
public final void b() {
|
|
this.f = true;
|
|
this.a.shutdownNow();
|
|
Handler handler = this.b;
|
|
if (handler != null) {
|
|
c cVar = this.d;
|
|
if (cVar != null) {
|
|
handler.removeCallbacks(cVar);
|
|
}
|
|
d dVar = this.c;
|
|
if (dVar != null) {
|
|
this.b.removeCallbacks(dVar);
|
|
}
|
|
this.b = null;
|
|
}
|
|
}
|
|
}
|