This is the code in ActivityThread.main():
public static void main(String[] args) {
......
Looper.prepareMainLooper();
...
Looper.loop();
throw new RuntimeException("Main thread loop unexpectedly exited");
}
It made the Looper running. There is a loop running in the Looper.loop() all the time. Why does Looper.loop() not block the UI thread?