VirtualAppDoc

by prife

455 Stars 165 Forks Last release: Not found 32 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

VirtualAppDoc

说明:本工程是VirtualApp项目的非官方文档。

理解VirtualApp代码的过程中,对我帮助很大两组系列文章:

  • https://github.com/tiann/understand-plugin-framework
  • http://gityuan.com/

PS.还有很多文章无法一一列举, 谨表谢忱。

Server Process 启动流程

getService VirtualCoreGetSerivce

Binder Provider调用过程 VABinderProvider

VirtualActivityManagerService启动流程 VAMS

startActivity 流程

VAStartActivity

VStubContentProvider

install流程

VAInstall

Broadcast流程

注意:VA对client的xml中定义的receiver(静态广播接收器)做了处理,详细参考VAInstall流程图。

标准Broadcast发送/接收

标准Broadcast发送/接收

VA中Broadcast发送/接收

VA中Broadcast发送/接收

VA中动态Broadcast注册

动态注册Broadcast,最终都会调用ActivityManagerNatvie#registerReceiver方法,因此VA中hook了这个方法然后改造IntentFilter的ACTION字段,具体改造方法与静态广播接收器的方式相同。然后创建一个新的

IIntentReceiver$Stub
对象,传递给AMS。也就是所谓静态代理方式。

代码:RegisterReceiver.java

请参考下面类结构图。

类结构图

PS

添加SVG图片的方法

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.