当前位置:网站首页>Activity startup process
Activity startup process
2022-06-25 00:25:00 【lcj908692】
Launcher request AMS Stage

AMS To ApplicationThread Stage

ApplicationThread To Activity start-up

Code / Detail analysis
Launcher -->AMS





final IBinder b = ServiceManager.getService(Context.ACTIVITY_SERVICE);
final IActivityManager am = IActivityManager.Stub.asInterface(b); // binder signal communication
return am;
Come here :launcher adopt binder The communication is transferred to AMS In the

The second stage :AMS To ActivityThread









final ActivityManagerService mService;





public void schedule() throws RemoteException {
mClient.scheduleTransaction(this);
} // This is through interprocess communication , Call to ActivityThread Of scheduleTransaction() in




ActivityStackSupervisor Class ,addCall() Method is added LaunchActivityItem object
public static LaunchActivityItem obtain(.....){.....}


Client yes ClientTransactionHandler object , namely Called ClientTransactionHandler Object's handleLaunchActivity() Methods
client.handleLaunchActivity(r, pendingActions, null /* customIntent */);
because ClientTransactionHandler Of handleLaunchActivity() It's an abstract method , So find the implementation class

ActivityThread Inherited ClientTransactionHandler. So it is called ActivityThread Of handleLaunchActivity() Methods

边栏推荐
- Dry and wet contacts
- Im instant messaging development application keeping alive process anti kill
- C# 闭包的垃圾回收
- 微搭低代码中实现增删改查
- Technology sharing | wvp+zlmediakit realizes streaming playback of camera gb28181
- Eliminate duplicate dependencies
- Transition from digitalization to intelligent manufacturing
- wx小程序跳转页面
- MySQL semi sync replication
- [interview question] what is a transaction? What are dirty reads, unrepeatable reads, phantom reads, and how to deal with several transaction isolation levels of MySQL
猜你喜欢

After 5 years of software testing in didi and ByteDance, it's too real

In the process of enterprise development, I found that a colleague used the select * from where condition for update

无需显示屏的VNC Viewer远程连接树莓派

UE4 WebBrowser图表不能显示问题

微搭低代码中实现增删改查

Time unified system

wx小程序跳转页面

Why are life science enterprises on the cloud in succession?

Single blind box removal, social blind box and friend blind box program source code

Signal integrity (SI) power integrity (PI) learning notes (XXV) differential pair and differential impedance (V)
随机推荐
Discrete mathematics and its application detailed explanation of exercises in the final exam of spring and summer semester of 2018-2019 academic year
离散数学及其应用 2018-2019学年春夏学期期末考试 习题详解
在滴滴和字节跳动干了 5年软件测试,太真实…
Virtual machine - network configuration
无需显示屏的VNC Viewer远程连接树莓派
[interview question] what is a transaction? What are dirty reads, unrepeatable reads, phantom reads, and how to deal with several transaction isolation levels of MySQL
Unimportant tokens can be stopped in advance! NVIDIA proposes an efficient visual transformer network a-vit with adaptive token to improve the throughput of the model
Zed acquisition
Adding, deleting, modifying and checking in low build code
融合模型权限管理设计方案
Go crawler framework -colly actual combat (III) -- panoramic cartoon picture capture and download
Do280openshift access control -- encryption and configmap
无人驾驶: 对多传感器融合的一些思考
Basic summary of MySQL database knowledge
Decoupling pages and components using lifecycle
Android SQLite database
[leaderboard] Carla leaderboard leaderboard leaderboard operation and participation in hands-on teaching
Svg+js keyboard control path
[Solved] Public key for mysql-community-xxx. rpm is not installed
I suddenly find that the request dependent package in NPM has been discarded. What should I do?