- 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
35 lines
1.1 KiB
Java
35 lines
1.1 KiB
Java
package kotlinx.coroutines.internal;
|
|
|
|
import java.lang.reflect.Method;
|
|
import java.util.concurrent.Executor;
|
|
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class ConcurrentKt {
|
|
public static final Method REMOVE_FUTURE_ON_CANCEL;
|
|
|
|
static {
|
|
Method method;
|
|
try {
|
|
method = ScheduledThreadPoolExecutor.class.getMethod("setRemoveOnCancelPolicy", Boolean.TYPE);
|
|
} catch (Throwable unused) {
|
|
method = null;
|
|
}
|
|
REMOVE_FUTURE_ON_CANCEL = method;
|
|
}
|
|
|
|
public static final boolean removeFutureOnCancel(Executor executor) {
|
|
Method method;
|
|
try {
|
|
ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = executor instanceof ScheduledThreadPoolExecutor ? (ScheduledThreadPoolExecutor) executor : null;
|
|
if (scheduledThreadPoolExecutor == null || (method = REMOVE_FUTURE_ON_CANCEL) == null) {
|
|
return false;
|
|
}
|
|
method.invoke(scheduledThreadPoolExecutor, Boolean.TRUE);
|
|
return true;
|
|
} catch (Throwable unused) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|