Merge "Clear locales without changing layout direction." into nyc-dev am: 6686711ba2 am: 18bf0e2ad2

am: 461e71472d

* commit '461e71472df1942936c27fb65f46b72c3eb4ab1b':
  Clear locales without changing layout direction.

Change-Id: I0db0a2e72765632803a17dce56857207ffc146e9
This commit is contained in:
Seigo Nonaka
2016-05-20 20:08:39 +00:00
committed by android-build-merger
2 changed files with 11 additions and 1 deletions

View File

@@ -1484,6 +1484,16 @@ public final class Configuration implements Parcelable, Comparable<Configuration
setLocales(loc == null ? LocaleList.getEmptyLocaleList() : new LocaleList(loc));
}
/**
* @hide
*
* Clears the locale without changing layout direction.
*/
public void clearLocales() {
mLocaleList = LocaleList.getEmptyLocaleList();
locale = null;
}
/**
* Return the layout direction. Will be either {@link View#LAYOUT_DIRECTION_LTR} or
* {@link View#LAYOUT_DIRECTION_RTL}.

View File

@@ -2252,7 +2252,7 @@ public final class Settings {
public static void clearConfiguration(Configuration inoutConfig) {
inoutConfig.fontScale = 0;
if (!inoutConfig.userSetLocale && !inoutConfig.getLocales().isEmpty()) {
inoutConfig.setLocales(LocaleList.getEmptyLocaleList());
inoutConfig.clearLocales();
}
}