代码拉取完成,页面将自动刷新
@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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。