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

Commit 943f6d0b authored by Ken Wakasa's avatar Ken Wakasa Committed by Android (Google) Code Review
Browse files

Merge "Turn off the spell checker when the spell checker is disabled in the settings" into ics-mr1

parents a3d9eba1 9b3855b7
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -84,9 +84,14 @@ public class SpellChecker implements SpellCheckerSessionListener {
    private void setLocale(Locale locale) {
        final TextServicesManager textServicesManager = (TextServicesManager)
                mTextView.getContext().getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
        if (!textServicesManager.isSpellCheckerEnabled()) {
            mSpellCheckerSession = null;
        } else {
            mSpellCheckerSession = textServicesManager.newSpellCheckerSession(
                    null /* Bundle not currently used by the textServicesManager */,
                locale, this, false /* means any available languages from current spell checker */);
                    locale, this,
                    false /* means any available languages from current spell checker */);
        }
        mCurrentLocale = locale;

        // Restore SpellCheckSpans in pool