Use correct spell check locale

Bug: 6542210
Change-Id: I414aa2321f30e396996d90fb8e90c1dbb3bb7b9e
This commit is contained in:
satok
2012-05-24 16:52:54 +09:00
parent 67e6070fa1
commit f927e17ae5
2 changed files with 5 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}