summaryrefslogtreecommitdiffstats
path: root/core/java/android/content
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2015-03-23 17:13:18 +0000
committerNarayan Kamath <narayan@google.com>2015-04-03 13:24:21 +0100
commit70392818f07f175d4914cef13b12c215ff08f1df (patch)
tree3d2089551523d4a0aea586bc22b5299d55304982 /core/java/android/content
parent492e501f9a42a0d715e9460f4157dba204322fd7 (diff)
downloadframeworks_base-70392818f07f175d4914cef13b12c215ff08f1df.zip
frameworks_base-70392818f07f175d4914cef13b12c215ff08f1df.tar.gz
frameworks_base-70392818f07f175d4914cef13b12c215ff08f1df.tar.bz2
Don't set userSetLocale from Configuration.setLocale.
This seems to have been a mistake : userSetLocale controls whether a locale is persisted and as written it's too easy to make system wide locale changes without intending to. Third party apps do not have sufficient permissions to set global locales anyway, so they won't care whether it's set or not. Also, set userSetLocale = true in the LocalePicker.updateLocale internal API, which is what all platform apps use to set the locale. In addition, this commit fixes a bug where we were not setting RTL directionality for the default locale loaded by the activity manager service. Change-Id: I2e11ad31e012dfa314ab8d78034f986b49ecae60
Diffstat (limited to 'core/java/android/content')
-rw-r--r--core/java/android/content/res/Configuration.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index b5eeb30..bc6d4ce 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -1284,14 +1284,12 @@ public final class Configuration implements Parcelable, Comparable<Configuration
/**
* Set the locale. This is the preferred way for setting up the locale (instead of using the
- * direct accessor). This will also set the userLocale and layout direction according to
- * the locale.
+ * direct accessor). This will also set the layout direction according to the locale.
*
* @param loc The locale. Can be null.
*/
public void setLocale(Locale loc) {
locale = loc;
- userSetLocale = true;
setLayoutDirection(locale);
}