diff --git a/api/system-current.txt b/api/system-current.txt index b7ea0e617cefb..b2d3da0250f3a 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -1781,6 +1781,7 @@ package android.content { field @Deprecated public static final String EXTRA_SIM_STATE = "ss"; field public static final String EXTRA_UNKNOWN_INSTANT_APP = "android.intent.extra.UNKNOWN_INSTANT_APP"; field public static final String EXTRA_VERIFICATION_BUNDLE = "android.intent.extra.VERIFICATION_BUNDLE"; + field public static final int FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT = 67108864; // 0x4000000 field public static final String METADATA_SETUP_VERSION = "android.SETUP_VERSION"; field @Deprecated public static final String SIM_ABSENT_ON_PERM_DISABLED = "PERM_DISABLED"; field @Deprecated public static final String SIM_LOCKED_NETWORK = "NETWORK"; diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 3bb0f92222370..c8f587f71bca8 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -6440,19 +6440,22 @@ public class Intent implements Parcelable, Cloneable { */ public static final int FLAG_RECEIVER_NO_ABORT = 0x08000000; /** - * If set, when sending a broadcast before boot has completed only + * If set, when sending a broadcast before the system has fully booted up + * (which is even before {@link #ACTION_LOCKED_BOOT_COMPLETED} has been sent)" only * registered receivers will be called -- no BroadcastReceiver components * will be launched. Sticky intent state will be recorded properly even * if no receivers wind up being called. If {@link #FLAG_RECEIVER_REGISTERED_ONLY} * is specified in the broadcast intent, this flag is unnecessary. * - *
This flag is only for use by system sevices as a convenience to - * avoid having to implement a more complex mechanism around detection + *
This flag is only for use by system services (even services from mainline modules) as a + * convenience to avoid having to implement a more complex mechanism around detection * of boot completion. * + *
This is useful to system server mainline modules
+ *
* @hide
*/
- @UnsupportedAppUsage
+ @SystemApi
public static final int FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT = 0x04000000;
/**
* Set when this broadcast is for a boot upgrade, a special mode that
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 03d34b595e4a7..d887032dbdbcb 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -370,6 +370,7 @@