Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7926f62a authored by satok's avatar satok
Browse files

Fix newSpellCheckerSession

Change-Id: Ia862dba70666c69b81d18836561b7e9a1c2d81b3
parent f39daef1
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;
                }
            }