diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-11-11 18:04:39 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-11-11 18:26:06 -0800 |
commit | 362d5b9b6429a2766f5b980d2010262135788ad8 (patch) | |
tree | ee504807092777070041239727bc9e23719123f2 /core/java/android/content | |
parent | 2ade6421f2d6dd615b559c951deace7143958b90 (diff) | |
download | frameworks_base-362d5b9b6429a2766f5b980d2010262135788ad8.zip frameworks_base-362d5b9b6429a2766f5b980d2010262135788ad8.tar.gz frameworks_base-362d5b9b6429a2766f5b980d2010262135788ad8.tar.bz2 |
Fix issue #2256032: Change CONFIGURATION_CHANGED and add a locale changed broadcast
You can no longer receive CONFIGURATION_CHANGED in a manifest, which is really really
bad (launching apps every time the screen is rotated!). A new LOCALE_CHANGED broadcast
is sent that you can receive in a manifest.
Change-Id: I80022375f0716db2e672382a29db3cea1af74702
Diffstat (limited to 'core/java/android/content')
-rw-r--r-- | core/java/android/content/Intent.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index b785dbf..c676a5b 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -1344,6 +1344,12 @@ public class Intent implements Parcelable { * can not be restarted will need to watch for this action and handle it * appropriately. * + * <p class="note"> + * You can <em>not</em> receive this through components declared + * in manifests, only by explicitly registering for it with + * {@link Context#registerReceiver(BroadcastReceiver, IntentFilter) + * Context.registerReceiver()}. + * * <p class="note">This is a protected intent that can only be sent * by the system. * @@ -1352,6 +1358,14 @@ public class Intent implements Parcelable { @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_CONFIGURATION_CHANGED = "android.intent.action.CONFIGURATION_CHANGED"; /** + * Broadcast Action: The current device's locale has changed. + * + * <p class="note">This is a protected intent that can only be sent + * by the system. + */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_LOCALE_CHANGED = "android.intent.action.LOCALE_CHANGED"; + /** * Broadcast Action: This is a <em>sticky broadcast</em> containing the * charging state, level, and other information about the battery. * See {@link android.os.BatteryManager} for documentation on the |