Is Looper.loop () the main loop for an application or OS looper?
I do not know what you think of the "OS looper". Looper works in your process if that is what you mean.
Where is ViewRootImpl (handler) .dispatchMessage (Message) located? Application or OS?
I do not know what you think of the "OS" in this context. ViewRootImpl is a class compiled by Dalvik that loads into your Dalvik VM, and its code is executed in your process. Otherwise, you cannot see it in the stack trace.
Can I intercept the generated GUI events in the main looper?
Only by changing the firmware to replace various classes, such as ViewRootImpl , with native code.
Is it safe to assume that all events created by a graphic event are processed in ViewRootImpl (handler) .handleCallback (Message)?
Of course, I would not have made this assumption. For example, not all applications use the widget framework (for example, games).
source share