alexandroid/decompiled/jadx/sources/androidx/emoji2/text/ConcurrencyHelpers.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

66 lines
2.5 KiB
Java

package androidx.emoji2.text;
import android.os.Handler;
import android.os.Looper;
import androidx.annotation.DoNotInline;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import java.util.Objects;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes14.dex */
class ConcurrencyHelpers {
private static final int FONT_LOAD_TIMEOUT_SECONDS = 15;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@RequiresApi(28)
public static class Handler28Impl {
private Handler28Impl() {
}
@DoNotInline
public static Handler createAsync(Looper looper) {
return Handler.createAsync(looper);
}
}
private ConcurrencyHelpers() {
}
@NonNull
@Deprecated
public static Executor convertHandlerToExecutor(@NonNull Handler handler) {
Objects.requireNonNull(handler);
return new ConcurrencyHelpers$$ExternalSyntheticLambda0(handler);
}
public static ThreadPoolExecutor createBackgroundPriorityExecutor(@NonNull final String str) {
ThreadFactory threadFactory = new ThreadFactory() { // from class: androidx.emoji2.text.ConcurrencyHelpers$$ExternalSyntheticLambda1
@Override // java.util.concurrent.ThreadFactory
public final Thread newThread(Runnable runnable) {
Thread lambda$createBackgroundPriorityExecutor$0;
lambda$createBackgroundPriorityExecutor$0 = ConcurrencyHelpers.lambda$createBackgroundPriorityExecutor$0(str, runnable);
return lambda$createBackgroundPriorityExecutor$0;
}
};
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0, 1, 15L, TimeUnit.SECONDS, new LinkedBlockingDeque(), threadFactory);
threadPoolExecutor.allowCoreThreadTimeOut(true);
return threadPoolExecutor;
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ Thread lambda$createBackgroundPriorityExecutor$0(String str, Runnable runnable) {
Thread thread = new Thread(runnable, str);
thread.setPriority(10);
return thread;
}
public static Handler mainHandlerAsync() {
return Handler28Impl.createAsync(Looper.getMainLooper());
}
}