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 mSpellCheckerSession = textServicesManager .newSpellCheckerSession (
@@ -99,12 +101,6 @@ private void setLocale(Locale locale) {
99101 // Change SpellParsers' wordIterator locale
100102 mWordIterator = new WordIterator (locale );
101103
102- // Stop all SpellParsers
103- final int length = mSpellParsers .length ;
104- for (int i = 0 ; i < length ; i ++) {
105- mSpellParsers [i ].finish ();
106- }
107-
108104 // Remove existing misspelled SuggestionSpans
109105 mTextView .removeMisspelledSpans ((Editable ) mTextView .getText ());
110106
You can’t perform that action at this time.
0 commit comments