diff --git a/core/api/current.txt b/core/api/current.txt index e367c31565649..f8891b4e17c04 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -11078,6 +11078,7 @@ package android.content { field public static final String ACTION_AIRPLANE_MODE_CHANGED = "android.intent.action.AIRPLANE_MODE"; field public static final String ACTION_ALL_APPS = "android.intent.action.ALL_APPS"; field public static final String ACTION_ANSWER = "android.intent.action.ANSWER"; + field public static final String ACTION_APPLICATION_LOCALE_CHANGED = "android.intent.action.APPLICATION_LOCALE_CHANGED"; field public static final String ACTION_APPLICATION_PREFERENCES = "android.intent.action.APPLICATION_PREFERENCES"; field public static final String ACTION_APPLICATION_RESTRICTIONS_CHANGED = "android.intent.action.APPLICATION_RESTRICTIONS_CHANGED"; field public static final String ACTION_APP_ERROR = "android.intent.action.APP_ERROR"; @@ -11298,6 +11299,7 @@ package android.content { field public static final String EXTRA_INSTALLER_PACKAGE_NAME = "android.intent.extra.INSTALLER_PACKAGE_NAME"; field public static final String EXTRA_INTENT = "android.intent.extra.INTENT"; field public static final String EXTRA_KEY_EVENT = "android.intent.extra.KEY_EVENT"; + field public static final String EXTRA_LOCALE_LIST = "android.intent.extra.LOCALE_LIST"; field public static final String EXTRA_LOCAL_ONLY = "android.intent.extra.LOCAL_ONLY"; field public static final String EXTRA_LOCUS_ID = "android.intent.extra.LOCUS_ID"; field public static final String EXTRA_MIME_TYPES = "android.intent.extra.MIME_TYPES"; diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 335e703ddacd9..896bf9ce2de42 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -2098,6 +2098,14 @@ public class Intent implements Parcelable, Cloneable { */ public static final String EXTRA_PACKAGE_NAME = "android.intent.extra.PACKAGE_NAME"; + /** + * Intent extra: A {@link android.os.LocaleList} + *
+ * Type: LocaleList + *
+ */ + public static final String EXTRA_LOCALE_LIST = "android.intent.extra.LOCALE_LIST"; + /** * Intent extra: A {@link Bundle} of extras for a package being suspended. Will be sent as an * extra with {@link #ACTION_MY_PACKAGE_SUSPENDED}. @@ -3070,13 +3078,46 @@ public class Intent implements Parcelable, Cloneable { public static final String ACTION_SPLIT_CONFIGURATION_CHANGED = "android.intent.action.SPLIT_CONFIGURATION_CHANGED"; /** - * Broadcast Action: The current device's locale has changed. + * Broadcast Action: The receiver's effective locale has changed. + * + * This happens when the device locale, or the + * {(TODO: will only compile after ag/15518063) @link LocaleManager#setApplicationLocales} + * receiving app's locale changed. + * + * Can be received by manifest-declared receivers. + * + *If only the app locale changed, includes the following extras: + *
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: Locale of a particular app has changed. + * + *
This broadcast is explicitly sent to the + * {@link android.content.pm.InstallSourceInfo#getInstallingPackageName} installer + * of the app whose locale has changed. + *
The broadcast could also be received by manifest-declared receivers with + * {@code android.permission.READ_APP_SPECIFIC_LOCALES} + * + *
This is a protected intent that can only be sent + * by the system. + * + *
Includes the following extras: + *