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

Commit 76bb11ca authored by Gilles Debunne's avatar Gilles Debunne Committed by Android (Google) Code Review
Browse files

Merge "Bug 5575396: close spell session on language change" into ics-mr1

parents 630a13bd 8b67db17
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -82,6 +82,8 @@ public class SpellChecker implements SpellCheckerSessionListener {
    }

    private void setLocale(Locale locale) {
        closeSession();

        final TextServicesManager textServicesManager = (TextServicesManager)
                mTextView.getContext().getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
        if (!textServicesManager.isSpellCheckerEnabled()) {
@@ -104,12 +106,6 @@ public class SpellChecker implements SpellCheckerSessionListener {
        // Change SpellParsers' wordIterator locale
        mWordIterator = new WordIterator(locale);

        // Stop all SpellParsers
        final int length = mSpellParsers.length;
        for (int i = 0; i < length; i++) {
            mSpellParsers[i].finish();
        }

        // Remove existing misspelled SuggestionSpans
        mTextView.removeMisspelledSpans((Editable) mTextView.getText());