屏幕事件会由Linux通过JNI传给WMS(WindowManagerService),然后由WMS传给Activity,最终经过PhoneWindow->DecorView开始往下分发。
WindowManagerService
View的事件分发核心源码为 dispatchTouchEvent() 方法:
dispatchTouchEvent()
public boolean dispatchTouchEvent(MotionEvent event) { // If the event should be handled by accessibility focus first. if (event
京公网安备 11010502049817号