Use correct spell check locale
Bug: 6542210 Change-Id: I414aa2321f30e396996d90fb8e90c1dbb3bb7b9e
This commit is contained in:
@ -146,7 +146,10 @@ public final class SpellCheckerSubtype implements Parcelable {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static Locale constructLocaleFromString(String localeStr) {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static Locale constructLocaleFromString(String localeStr) {
|
||||
if (TextUtils.isEmpty(localeStr))
|
||||
return null;
|
||||
String[] localeParams = localeStr.split("_", 3);
|
||||
|
@ -7678,7 +7678,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
mContext.getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
|
||||
final SpellCheckerSubtype subtype = textServicesManager.getCurrentSpellCheckerSubtype(true);
|
||||
if (subtype != null) {
|
||||
locale = new Locale(subtype.getLocale());
|
||||
locale = SpellCheckerSubtype.constructLocaleFromString(subtype.getLocale());
|
||||
}
|
||||
return locale;
|
||||
}
|
||||
|
Reference in New Issue
Block a user