应用的Activity生命周期调用后EvenetLog回调

时间:2025-04-23 08:08:51

Activity 生命周期 系统EvenetLog回调
EventLog路径:
Android13/frameworks/base/core/java/android/app/
wm_on_create_called
wm_on_restart_called
wm_on_start_called
wm_on_resume_called
wm_on_top_resumed_gained_called
wm_on_top_resumed_lost_called
wm_on_paused_called
wm_on_stop_called
wm_on_destroy_called

1 # See system/core/logcat/ for a description of the format of this file.
2
3 option java_package
4
5 # Do not change these names without updating the checkin_events setting in
6 # google3/googledata/wireless/android/provisioning/ !!
7 #
8 # The activity’s onPause has been called.
(mIdent, getComponentName().getClassName(), “performPause”);
表示Activity的onPause被调用完成,这个状态处于不可接收输入事件,但还处于可见状态,不能在里面在耗时的操作会导致下一个界面启动慢导致ANR。
9 30021 wm_on_paused_called (Token|1|5),(Component Name|3),(Reason|3)

10 # The activity’s onResume has been called.
(mIdent, getComponentName().getClassName(), reason);
表示Activity的onResume被调用完成.Android R变更为:wm_on_resume_called (之前am_on_resume_called )
11 30022 wm_on_resume_called (Token|1|5),(Component Name|3),(Reason|3)
12
13 # The activity’s onStop has been called.
(mIdent, getComponentName().getClassName(), reason);
表示Activity的onStop被调用完成.
14 30049 wm_on_stop_called (Token|1|5),(Component Name|3),(Reason|3)
15
16 # The activity’s onCreate has been called.
Android R变更为:wm_on_create_called(之前am_on_create_called)
(mIdent, getComponentName().getClassName(),“performCreate”);
表示Activity的 onCreate被调用完成,即APP中的onCreate调用完成
17 30057 wm_on_create_called (Token|1|5),(Component Name|3),(Reason|3)

18 # The activity’s onRestart has been called.
(mIdent, getComponentName().getClassName(), reason);
表示Activity的onRestart被调用完成.
19 30058 wm_on_restart_called (Token|1|5),(Component Name|3),(Reason|3)
20 # The activity’s onStart has been called.
(mIdent, getComponentName().getClassName(), reason);
表示Activity的onStart被调用完成.
21 30059 wm_on_start_called (Token|1|5),(Component Name|3),(Reason|3)

22 # The activity’s onDestroy has been called.
(mIdent, getComponentName().getClassName(),“performDestroy”);
表示Activity的onDestroy被调用完成.
23 30060 wm_on_destroy_called (Token|1|5),(Component Name|3),(Reason|3)

24 # The activity’s onActivityResult has been called.
(mIdent, getComponentName().getClassName(), reason);
表示Activity的onActivityResult被调用完成.
25 30062 wm_on_activity_result_called (Token|1|5),(Component Name|3),(Reason|3)
26
27 # The activity’s onTopResumedActivityChanged(true) has been called.
(mIdent, getComponentName().getClassName(),reason);
表示Activity的onTopResumedActivityChanged(true)被调用完成.
28 30064 wm_on_top_resumed_gained_called (Token|1|5),(Component Name|3),(Reason|3)

29 # The activity’s onTopResumedActivityChanged(false) has been called.
(mIdent, getComponentName().getClassName(),reason);
表示Activity的onTopResumedActivityChanged(false)被调用完成
30 30065 wm_on_top_resumed_lost_called (Token|1|5),(Component Name|3),(Reason|3)

AOSP代码路径:
/android-13.0.0_r3/xref/frameworks/base/core/java/android/app/

参考
/chi_wy/article/details/114639207
Activity 生命周期
/jackzhouyu/article/details/105951159https:///xingchenxuanfeng/article/details/53810351