Activity启动流程记录

android.app.Activity public void startActivityForResult(Intent intent,
int requestCode,
Bundle options)

android.app.Instrumentation public Instrumentation.ActivityResult execStartActivity(Context who,
IBinder contextThread,
IBinder token,
Activity target,
Intent intent,
int requestCode,
Bundle options)

ActivityManagerProxy
android.app.IActivityManager public int startActivity(IApplicationThread caller,
String callingPackage,
Intent intent,
String resolvedType,
IBinder resultTo,
String resultWho,
int requestCode,
int flags,
ProfilerInfo profilerInfo,
Bundle options)

ASM 启动中

android.app.ActivityThread.ApplicationThread public final void scheduleLaunchActivity(Intent intent,
IBinder token,
int ident,
ActivityInfo info,
Configuration curConfig,
CompatibilityInfo compatInfo,
String referrer,
IVoiceInteractor voiceInteractor,
int procState,
Bundle state,
PersistableBundle persistentState,
List pendingResults,
List pendingNewIntents,
boolean notResumed,
boolean isForward,
ProfilerInfo profilerInfo)

发送 android.app.ActivityThread.H.LAUNCH_ACTIVITY 消息

android.app.ActivityThread private void handleLaunchActivity(@NotNull ActivityThread.ActivityClientRecord r,
Intent customIntent)

android.app.ActivityThread private Activity performLaunchActivity(@NotNull ActivityThread.ActivityClientRecord r,
Intent customIntent)

android.app.Instrumentation public Activity newActivity(@NotNull ClassLoader cl,
String className,
Intent intent)

callActivityOnCreate

猜你喜欢

转载自blog.csdn.net/qq_27512671/article/details/116751995