summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Narayan Kamath <narayan@google.com> 2015-01-13 15:51:57 +0000
committer Narayan Kamath <narayan@google.com> 2015-01-15 11:50:55 +0000
commit7dc8d32fd2fae16c6b1c95a49c864c2041a7a72c (patch)
treee0a4fb118643cedbfab6c07b74bac56da427ab73
parent66b4d48469c74f7dd889f3f685b436fcb957bf16 (diff)
Fix unexpected language changes on SIM card insertion.
There are two separate issues here that need to be fixed, both boil down to the fact that adding an imperative (userSetLocale) to the Configuration is a bad idea. Because of this: - We'd never persist the first user set configuration if it was en_US, because of an erroneous call to Configuration.setLocale. - ActivityManager.getConfiguration would sometimes return a Configuration with userSetLocale == true, which means callers with the right permissions would inadvertently persist a locale they didn't want to persist. bug: 18879010 (cherry picked from commit c63a16b8e46f2f3ecce6c548663cc3185f011fd6) Change-Id: I4d714eb1f75afc0a5bf4d53a374df4ed16e328bf
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 138bedc6e056..3cc27f48af19 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -2303,7 +2303,7 @@ public final class ActivityManagerService extends ActivityManagerNative
ConfigurationInfo.GL_ES_VERSION_UNDEFINED);
mConfiguration.setToDefaults();
- mConfiguration.setLocale(Locale.getDefault());
+ mConfiguration.locale = Locale.getDefault();
mConfigurationSeq = mConfiguration.seq = 1;
mProcessCpuTracker.init();
@@ -16197,6 +16197,7 @@ public final class ActivityManagerService extends ActivityManagerNative
Configuration ci;
synchronized(this) {
ci = new Configuration(mConfiguration);
+ ci.userSetLocale = false;
}
return ci;
}