源码时序图
2021-11-09 12:59:19 66 举报
framework 源码分析
作者其他创作
大纲/内容
execute()
addView(
Activity
startActivity(
scheduleVsync(
startActivityAsUser(
execute
FrameDisplayEventReceiver
attachApplication(mAppThread)
execStartActivity(
handleResumeActivity
doScheduleVsync()
Choreographer
schedule()
cycleToPath
performLifecycleSequence
performDraw();
postCallbackDelayed
scheduleTransaction
H
WindowManagerImpl
mInstrumentation.callActivityOnCreate(
TransactionExecutor
performCreate
sendMessage(
getService()
Instrumentation.ActivityResult ar
execute(
handleBindApplication()
postCallbackDelayedInternal
startActivityForResult(
startActivity(
sendActivityResultLocked
setView
getReusableIntentActivity()
ActivityManager.getService()
Application 的启动
ActivityThread extends ClientTransactionHandler
requestLayout();
doScheduleCallback(
ClientTransaction
computeLaunchingTaskFlags(
Instrumentation
computeSourceStack
performLaunchActivity
回掉 ActivityThread
client.handleResumeActivity(
scheduleTraversals
cycleToPath(
View的绘制流程
ApplicationThread
WindowManagerGlobal
attachApplicationLocked(thread)
run(
startActivityMayWait
ViewRootImpl
ActivityStarter
ActivityThread.java
startActivityUnchecked
返回 AMS 对象
setInitialState(
final TraversalRunnable mTraversalRunnable = new TraversalRunnable();
DisplayEventReceiver
handleMessage
ActivityThread
ActivityLifecycleItem
bindApplication(
ClientTransactionHandler
final ApplicationThread mAppThread = new ApplicationThread(); final H mH = new H();
callActivityOnCreate
scheduleFrameLocked(
main()
doTraversal()
ResumeActivityItem extends ActivityLifecycleItem
nativeScheduleVsync(mReceiverPtr);
mH.sendMessage(msg);
performLayout(
ActivityManagerService.java
doFrame(
performMeasure(
Activity 的启动
ActivityManager
scheduleTransaction(
handleLaunchActivity(
activity.performCreate(
返回IActivityManager 实际是AMS
ClientLifecycleManager
获得AMS的引用
postCallback(
executeLifecycleState
performTraversals();
onCreate
AMS
startActivity
scheduleVsyncLocked()
0 条评论
下一页