Add new queue to offload slow broadcasts
Process BOOT_COMPLETED on this new queue
Change-Id: I14e7e7cc42f02b38a9becb47f7913684f55979fa
Test: boot device, dumpsys activity broadcasts
Bug: 111368744
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index c0463e9..8072901 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -5269,6 +5269,7 @@
FLAG_RECEIVER_EXCLUDE_BACKGROUND,
FLAG_RECEIVER_FROM_SHELL,
FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS,
+ FLAG_RECEIVER_OFFLOAD,
})
@Retention(RetentionPolicy.SOURCE)
public @interface Flags {}
@@ -5313,6 +5314,7 @@
FLAG_RECEIVER_EXCLUDE_BACKGROUND,
FLAG_RECEIVER_FROM_SHELL,
FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS,
+ FLAG_RECEIVER_OFFLOAD,
})
@Retention(RetentionPolicy.SOURCE)
public @interface MutableFlags {}
@@ -5739,6 +5741,12 @@
*/
public static final int FLAG_RECEIVER_FOREGROUND = 0x10000000;
/**
+ * If set, when sending a broadcast the recipient will be run on the offload queue.
+ *
+ * @hide
+ */
+ public static final int FLAG_RECEIVER_OFFLOAD = 0x80000000;
+ /**
* If this is an ordered broadcast, don't allow receivers to abort the broadcast.
* They can still propagate results through to later receivers, but they can not prevent
* later receivers from seeing the broadcast.