-
Notifications
You must be signed in to change notification settings - Fork 2
/
5.IMS的事件生成过程_时序图.txt
66 lines (47 loc) · 1.84 KB
/
5.IMS的事件生成过程_时序图.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@startuml
'请先安装PlantUML plugin查看该uml
title __IMS的事件生成过程__
entity EventHub
entity InputReader
database Queue
entity InputDispatcher
entity InputMonitor
entity WindowManagerService as wms
entity "ViewRootImpl中的\n WindowInputEventReceiver" as InputEventReceiver
'WindowInputEventReceiver 是ViewRootImpl的内部类,
entity DecorView
hnote over Queue#ccffe5:事件缓存队列
hnote over wms#ccffe5:下一步:\n事件分发到Activity
EventHub -> EventHub: 读取/dev/input/下的设备文件
activate EventHub
deactivate EventHub
group InputReaderThread
InputReader -> InputReader: loopOnce()
activate InputReader
InputReader -> EventHub: getEvents()
InputReader -> Queue: 事件入队
deactivate InputReader
activate Queue#ccffe5
end
wms -> InputMonitor: updateInputWindowsLw()\n更新焦点窗口
group InputDispatcherThread
InputDispatcher ->InputDispatcher: dispatchOnce()
activate InputDispatcher
InputDispatcher -> Queue: 读取事件
deactivate Queue
InputDispatcher -> InputDispatcher :事件预处理\n1.repeatCount\n2.交给wms处理\n3.忽略
activate InputDispatcher
deactivate InputDispatcher
InputDispatcher -> InputDispatcher: findFocusedWindowTargetsLocked()
activate InputDispatcher
InputDispatcher -> InputMonitor: 查询当前焦点窗口
activate InputMonitor
InputMonitor --> InputDispatcher
deactivate InputMonitor
deactivate InputDispatcher
InputDispatcher -> InputMonitor: dispatchEventLocked()\n分发事件给当前焦点窗口
deactivate InputDispatcher
end
InputMonitor -> InputEventReceiver:通过InputChannel的socket通知
InputEventReceiver -> DecorView:经过各层责任链InputStage\n最终到DecoerView
@enduml