OSDN Git Service

Send LOCKED_BOOT_COMPLETED to background apps.
authorJeff Sharkey <jsharkey@android.com>
Thu, 17 Dec 2015 22:38:20 +0000 (15:38 -0700)
committerJeff Sharkey <jsharkey@android.com>
Thu, 17 Dec 2015 22:38:20 +0000 (15:38 -0700)
This mirrors how we're treating the normal BOOT_COMPLETED broadcast.

Bug: 26151835
Change-Id: Ibe1df0df8b89aafbe9af073e14fdd428710a6a40

services/core/java/com/android/server/am/UserController.java

index e49bc3c..5426b72 100644 (file)
@@ -215,7 +215,8 @@ final class UserController {
 
                 Intent intent = new Intent(Intent.ACTION_LOCKED_BOOT_COMPLETED, null);
                 intent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
-                intent.addFlags(Intent.FLAG_RECEIVER_NO_ABORT);
+                intent.addFlags(Intent.FLAG_RECEIVER_NO_ABORT
+                        | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
                 mService.broadcastIntentLocked(null, null, intent, null, resultTo, 0, null, null,
                         new String[] { android.Manifest.permission.RECEIVE_BOOT_COMPLETED },
                         AppOpsManager.OP_NONE, null, true, false, MY_PID, SYSTEM_UID, userId);