diff options
author | Narayan Kamath <narayan@google.com> | 2015-02-13 12:09:31 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-13 12:09:31 +0000 |
commit | a511eea83b0209729e4b42e219f233f818a6d9e7 (patch) | |
tree | 3adec75bf9a3e81f5a922ccfbe4b5e4a1ffa49bd | |
parent | 04057e5d14030ef54c522b2372019cf2858083e9 (diff) | |
parent | aee7f64c10ffd2135dc98f7a540836ad7a32438b (diff) | |
download | frameworks_base-a511eea83b0209729e4b42e219f233f818a6d9e7.zip frameworks_base-a511eea83b0209729e4b42e219f233f818a6d9e7.tar.gz frameworks_base-a511eea83b0209729e4b42e219f233f818a6d9e7.tar.bz2 |
am aee7f64c: am b4a5c04c: Merge "Remove code that sets user.* system properties."
* commit 'aee7f64c10ffd2135dc98f7a540836ad7a32438b':
Remove code that sets user.* system properties.
-rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerService.java | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 97323d0..34a5249 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -16692,10 +16692,11 @@ public final class ActivityManagerService extends ActivityManagerNative EventLog.writeEvent(EventLogTags.CONFIGURATION_CHANGED, changes); - if (values.locale != null && !initLocale) { - saveLocaleLocked(values.locale, - !values.locale.equals(mConfiguration.locale), - values.userSetLocale); + if (!initLocale && values.locale != null && values.userSetLocale) { + final String languageTag = values.locale.toLanguageTag(); + SystemProperties.set("persist.sys.locale", languageTag); + mHandler.sendMessage(mHandler.obtainMessage(SEND_LOCALE_TO_MOUNT_DAEMON_MSG, + values.locale)); } mConfigurationSeq++; @@ -16801,27 +16802,6 @@ public final class ActivityManagerService extends ActivityManagerNative && config.touchscreen == Configuration.TOUCHSCREEN_NOTOUCH); } - /** - * Save the locale. You must be inside a synchronized (this) block. - */ - private void saveLocaleLocked(Locale l, boolean isDiff, boolean isPersist) { - final String languageTag = l.toLanguageTag(); - if (isDiff) { - SystemProperties.set("user.locale", languageTag); - - // TODO: Who uses these ? There are no references to these system - // properties in documents or code. Did the author intend to call - // System.setProperty() instead ? Even that wouldn't have any effect. - SystemProperties.set("user.language", l.getLanguage()); - SystemProperties.set("user.region", l.getCountry()); - } - - if (isPersist) { - SystemProperties.set("persist.sys.locale", languageTag); - mHandler.sendMessage(mHandler.obtainMessage(SEND_LOCALE_TO_MOUNT_DAEMON_MSG, l)); - } - } - @Override public boolean shouldUpRecreateTask(IBinder token, String destAffinity) { synchronized (this) { |