am f927e17a: Use correct spell check locale

* commit 'f927e17ae543b6edeae8200cc86c59c3ee740670':
  Use correct spell check locale
This commit is contained in:
satok
2012-05-24 01:39:35 -07:00
committed by Android Git Automerger
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;
}