package kotlinx.coroutines.android;

import android.os.Looper;
import g.i;
import h.a.i1.a;
import h.a.i1.c;
import h.a.k1.l;
import h.a.x0;
import java.util.List;

/* JADX INFO: compiled from: HandlerDispatcher.kt */
/* JADX INFO: loaded from: classes.dex */
@i
public final class AndroidDispatcherFactory implements l {
    @Override // h.a.k1.l
    public x0 createDispatcher(List<? extends l> list) {
        Looper mainLooper = Looper.getMainLooper();
        if (mainLooper != null) {
            return new a(c.a(mainLooper, true), null, false);
        }
        throw new IllegalStateException("The main looper is not available");
    }

    @Override // h.a.k1.l
    public int getLoadPriority() {
        return 1073741823;
    }

    @Override // h.a.k1.l
    public String hintOnError() {
        return "For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used";
    }
}
