diff options
| author | Adam Lesinski <adamlesinski@google.com> | 2018-01-25 13:03:57 -0800 |
|---|---|---|
| committer | Adam Lesinski <adamlesinski@google.com> | 2018-02-08 16:41:37 -0800 |
| commit | 57fccd61a53b962f568235dccf9e8bc23005a41b (patch) | |
| tree | 8ab034f82478db84e519cd41b5e60a31609832f8 /core/java | |
| parent | 1b6f515550969020f0622afb7f82b24d7150c3c1 (diff) | |
Send broadcast to pkg installers on config change
Send a protected system broadcast to apps that hold
the INSTALL_PACKAGES permission whenever a change to
properties like locale or display density happens.
Receivers can be registered in the manifest, and a process
will be woken up to receive the broadcast.
This will happen rarely, since the configuration changes
eligible to trigger this broadcast are rare themselves.
Bug: 63918966
Test: manual
Change-Id: I817a51ea05f762e02561691825d57d643db7dc30
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/content/Intent.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index fa73e3cbab99..12d4079ce1f0 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -2399,6 +2399,26 @@ public class Intent implements Parcelable, Cloneable { */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_CONFIGURATION_CHANGED = "android.intent.action.CONFIGURATION_CHANGED"; + + /** + * Broadcast Action: The current device {@link android.content.res.Configuration} has changed + * such that the device may be eligible for the installation of additional configuration splits. + * Configuration properties that can trigger this broadcast include locale and display density. + * + * <p class="note"> + * Unlike {@link #ACTION_CONFIGURATION_CHANGED}, you <em>can</em> receive this through + * components declared in manifests. However, the receiver <em>must</em> hold the + * {@link android.Manifest.permission#INSTALL_PACKAGES} permission. + * + * <p class="note"> + * This is a protected intent that can only be sent by the system. + * + * @hide + */ + @SystemApi + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_SPLIT_CONFIGURATION_CHANGED = + "android.intent.action.SPLIT_CONFIGURATION_CHANGED"; /** * Broadcast Action: The current device's locale has changed. * |
