Fix newSpellCheckerSession
Change-Id: Ia862dba70666c69b81d18836561b7e9a1c2d81b3
This commit is contained in:
@@ -77,6 +77,10 @@ public final class TextServicesManager {
|
||||
if (listener == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
if (!referToSpellCheckerLanguageSettings && locale == null) {
|
||||
throw new IllegalArgumentException("Locale should not be null if you don't refer"
|
||||
+ " settings.");
|
||||
}
|
||||
final SpellCheckerInfo sci;
|
||||
try {
|
||||
sci = sService.getCurrentSpellChecker(null);
|
||||
@@ -101,9 +105,10 @@ public final class TextServicesManager {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
final String localeStr = locale.toString();
|
||||
for (int i = 0; i < sci.getSubtypeCount(); ++i) {
|
||||
final SpellCheckerSubtype subtype = sci.getSubtypeAt(i);
|
||||
if (subtype.getLocale().equals(locale)) {
|
||||
if (subtype.getLocale().equals(localeStr)) {
|
||||
subtypeInUse = subtype;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user