-
Notifications
You must be signed in to change notification settings - Fork 187
/
VAInstall.puml
80 lines (64 loc) · 2.45 KB
/
VAInstall.puml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@startuml
box "Main process" #LightBlue
participant VirtualCore
end box
box "Server process" #LightGreen
participant VAppManagerService
participant PackageParserCompat
participant VEnvironment
participant NativeLibraryHelperCompat
participant AppSetting
participant StaticBroadcastSystem
end box
[-> VirtualCore : installApp
activate VirtualCore
VirtualCore -> VAppManagerService : installApp
activate VAppManagerService
VAppManagerService -> VAppManagerService: install
activate VAppManagerService
VAppManagerService -> PackageParserCompat : parsePackage
activate PackageParserCompat
deactivate PackageParserCompat
note over VAppManagerService
接下来创建client应用需要的相关数据结构,并在VA的data目录下
为client创建data目录,与系统中该应用的data目录隔离
endnote
VAppManagerService -> VEnvironment : getDataAppPackageDirectory(pkg.packageName)
activate VEnvironment
deactivate VEnvironment
VAppManagerService -> NativeLibraryHelperCompat : copyNativeBinaries
activate NativeLibraryHelperCompat
deactivate NativeLibraryHelperCompat
VAppManagerService -> AppSetting : new AppSetting()
activate AppSetting
VAppManagerService <-- AppSetting : appSetting:AppSetting
note over VAppManagerService
接下来构造AppSetting数据结构,其中包括:
String packageName;
String apkPath;
String libPath;
String odexDir;
boolean dependSystem;
int appId;
public PackageParser parser;
endnote
deactivate AppSetting
VAppManagerService -> StaticBroadcastSystem : startApp
note over StaticBroadcastSystem
在这里处理client的静态广播接收器,核心思想是对Clientd每个
static broadcast receiver分别注册一个动态广播接收器到VA
应用(VA服务进程)。
注意,VA会修改receiver的IntentFilter的ACTION。
并且在这里设计了黑名单机制过滤ACTION。
endnote
activate StaticBroadcastSystem
deactivate StaticBroadcastSystem
VAppManagerService -> VAppManagerService : notifyAppInstalled
activate VAppManagerService
deactivate VAppManagerService
deactivate VAppManagerService
VirtualCore <-- VAppManagerService
deactivate VAppManagerService
[<- VirtualCore
deactivate VirtualCore
@enduml