1 Star 0 Fork 0

GrantWoo/VirtualAppDoc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
VAInstall.puml 2.45 KB
一键复制 编辑 原始数据 按行查看 历史
prife 提交于 2016-08-25 12:08 . update VAInstall, and add static broadcast
@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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/grantwoo/VirtualAppDoc.git
git@gitee.com:grantwoo/VirtualAppDoc.git
grantwoo
VirtualAppDoc
VirtualAppDoc
master

搜索帮助