File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,8 @@ public SpellChecker(TextView textView) {
8282 }
8383
8484 private void setLocale (Locale locale ) {
85+ closeSession ();
86+
8587 final TextServicesManager textServicesManager = (TextServicesManager )
8688 mTextView .getContext ().getSystemService (Context .TEXT_SERVICES_MANAGER_SERVICE );
8789 if (!textServicesManager .isSpellCheckerEnabled ()) {
@@ -104,12 +106,6 @@ private void setLocale(Locale locale) {
104106 // Change SpellParsers' wordIterator locale
105107 mWordIterator = new WordIterator (locale );
106108
107- // Stop all SpellParsers
108- final int length = mSpellParsers .length ;
109- for (int i = 0 ; i < length ; i ++) {
110- mSpellParsers [i ].finish ();
111- }
112-
113109 // Remove existing misspelled SuggestionSpans
114110 mTextView .removeMisspelledSpans ((Editable ) mTextView .getText ());
115111
You can’t perform that action at this time.
0 commit comments