what-the-bank/sources/kotlinx/coroutines/android/AndroidDispatcherFactory.java

31 lines
1.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package kotlinx.coroutines.android;
import android.os.Looper;
import java.util.List;
import kotlinx.coroutines.internal.MainDispatcherFactory;
import o.gfJ;
import o.gfX;
import o.gfY;
/* loaded from: classes.dex */
public final class AndroidDispatcherFactory implements MainDispatcherFactory {
@Override // kotlinx.coroutines.internal.MainDispatcherFactory
public final int getLoadPriority() {
return 1073741823;
}
@Override // kotlinx.coroutines.internal.MainDispatcherFactory
public final gfJ createDispatcher(List<? extends MainDispatcherFactory> list) {
Looper mainLooper = Looper.getMainLooper();
if (mainLooper == null) {
throw new IllegalStateException("The main looper is not available");
}
return new gfY(gfX.aDc_(mainLooper));
}
@Override // kotlinx.coroutines.internal.MainDispatcherFactory
public final String hintOnError() {
return "For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used";
}
}