Skip to content

Commit f927e17

Browse files
committed
Use correct spell check locale
Bug: 6542210 Change-Id: I414aa2321f30e396996d90fb8e90c1dbb3bb7b9e
1 parent 67e6070 commit f927e17

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

core/java/android/view/textservice/SpellCheckerSubtype.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ public boolean equals(Object o) {
146146
return false;
147147
}
148148

149-
private static Locale constructLocaleFromString(String localeStr) {
149+
/**
150+
* @hide
151+
*/
152+
public static Locale constructLocaleFromString(String localeStr) {
150153
if (TextUtils.isEmpty(localeStr))
151154
return null;
152155
String[] localeParams = localeStr.split("_", 3);

core/java/android/widget/TextView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7678,7 +7678,7 @@ public Locale getTextServicesLocale() {
76787678
mContext.getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
76797679
final SpellCheckerSubtype subtype = textServicesManager.getCurrentSpellCheckerSubtype(true);
76807680
if (subtype != null) {
7681-
locale = new Locale(subtype.getLocale());
7681+
locale = SpellCheckerSubtype.constructLocaleFromString(subtype.getLocale());
76827682
}
76837683
return locale;
76847684
}

0 commit comments

Comments
 (0)