Merge "Bug 5575396: close spell session on language change" into ics-mr1
This commit is contained in:
committed by
Android (Google) Code Review
commit
76bb11ca64
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user