Android 12.0framework adds custom boot broadcast

1 Overview

In the system customization development of 12.0, when some built-in apps need to receive the boot broadcast and then do some related operations, it takes a long time to receive the boot broadcast, or the boot broadcast cannot be received, so this You need to know where the boot broadcast is sent, and then customize the boot broadcast to receive the custom boot broadcast and develop some functions

2. Framework adds the core code of custom boot broadcast

    /frameworks/base/core/java/android/app/ActivityThread.java
       /frameworks/base/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
      /frameworks/base/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
      /frameworks/base/services/core/java/com/android/server/wm/WindowManagerService.java
     /frameworks/base/services/core/java/com/android/server/am/UserController.java

3. The framework adds the function analysis of custom startup broadcast and realizes
  3.1 ActivityThread.java related codes about startup

    public void handleResumeActivity(IBinder token, Boolean finalStateRequest, Boolean isForward,
    String reason) {
    	// If we are getting ready to gc after going to the background, well
    	// we are back ac

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/130909572