diff --git a/docs/html/guide/topics/resources/localization.jd b/docs/html/guide/topics/resources/localization.jd index 1ee66062c4d2c..0a96a1520ba5f 100644 --- a/docs/html/guide/topics/resources/localization.jd +++ b/docs/html/guide/topics/resources/localization.jd @@ -433,8 +433,8 @@ application, however, should localize properly.

To change the locale in the emulator by using the adb shell.

    -
  1. Pick the locale you want to test and determine its language and region codes, for -example fr for French and CA for Canada.
    +
  2. Pick the locale you want to test and determine its BCP-47 language tag, for +example, Canadian French would be fr-CA.
  3. Launch an emulator.
  4. From a command-line shell on the host computer, run the following @@ -444,16 +444,14 @@ command:
    the -e option:
    adb -e shell
  5. At the adb shell prompt (#), run this command:
    - setprop persist.sys.language [language code];setprop -persist.sys.country [country code];stop;sleep 5;start
    + setprop persist.sys.locale [BCP-47 language tag];stop;sleep 5;start
    Replace bracketed sections with the appropriate codes from Step 1.

For instance, to test in Canadian French:

-

setprop persist.sys.language fr;setprop persist.sys.country -CA;stop;sleep 5;start

+

setprop persist.sys.locale fr-CA;stop;sleep 5;start

This will cause the emulator to restart. (It will look like a full reboot, but it is not.) Once the Home screen appears again, re-launch your application (for diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java index 49177fc1f9b89..e803523fe9a04 100644 --- a/services/core/java/com/android/server/MountService.java +++ b/services/core/java/com/android/server/MountService.java @@ -860,11 +860,6 @@ class MountService extends IMountService.Stub // Temporary workaround for http://b/17945169. Slog.d(TAG, "Setting system properties to " + systemLocale + " from mount service"); SystemProperties.set("persist.sys.locale", locale.toLanguageTag()); - - // TODO: Stop setting these properties once we've removed all - // references to them. - SystemProperties.set("persist.sys.language", locale.getLanguage()); - SystemProperties.set("persist.sys.country", locale.getCountry()); } /** diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 91736f38aba18..ff9e257612b18 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -16420,15 +16420,6 @@ public final class ActivityManagerService extends ActivityManagerNative if (isPersist) { SystemProperties.set("persist.sys.locale", languageTag); - - // These values are *deprecated*, use persist.sys.locale instead. - // - // TODO: Stop setting these values once all code that references - // them has been removed. - SystemProperties.set("persist.sys.language", l.getLanguage()); - SystemProperties.set("persist.sys.country", l.getCountry()); - SystemProperties.set("persist.sys.localevar", l.getVariant()); - mHandler.sendMessage(mHandler.obtainMessage(SEND_LOCALE_TO_MOUNT_DAEMON_MSG, l)); } }