Merge "Clear locales without changing layout direction." into nyc-dev am: 6686711ba2
am: 18bf0e2ad2
* commit '18bf0e2ad22a28060e9cbd1516b1c36236c5b557':
Clear locales without changing layout direction.
Change-Id: Ia3925ac1adbf3e5cdaa45c1d88f9fc50483765cb
This commit is contained in:
@@ -1484,6 +1484,16 @@ public final class Configuration implements Parcelable, Comparable<Configuration
|
|||||||
setLocales(loc == null ? LocaleList.getEmptyLocaleList() : new LocaleList(loc));
|
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
|
* Return the layout direction. Will be either {@link View#LAYOUT_DIRECTION_LTR} or
|
||||||
* {@link View#LAYOUT_DIRECTION_RTL}.
|
* {@link View#LAYOUT_DIRECTION_RTL}.
|
||||||
|
|||||||
@@ -2252,7 +2252,7 @@ public final class Settings {
|
|||||||
public static void clearConfiguration(Configuration inoutConfig) {
|
public static void clearConfiguration(Configuration inoutConfig) {
|
||||||
inoutConfig.fontScale = 0;
|
inoutConfig.fontScale = 0;
|
||||||
if (!inoutConfig.userSetLocale && !inoutConfig.getLocales().isEmpty()) {
|
if (!inoutConfig.userSetLocale && !inoutConfig.getLocales().isEmpty()) {
|
||||||
inoutConfig.setLocales(LocaleList.getEmptyLocaleList());
|
inoutConfig.clearLocales();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user