Loading java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +25 −20 Original line number Diff line number Diff line Loading @@ -372,6 +372,9 @@ public class AndroidSpellCheckerService extends SpellCheckerService mUserDictionaries = Collections.synchronizedMap(new TreeMap<String, Dictionary>()); final Map<String, Dictionary> oldWhitelistDictionaries = mWhitelistDictionaries; mWhitelistDictionaries = Collections.synchronizedMap(new TreeMap<String, Dictionary>()); new Thread("spellchecker_close_dicts") { @Override public void run() { for (DictionaryPool pool : oldPools.values()) { pool.close(); } Loading @@ -387,13 +390,15 @@ public class AndroidSpellCheckerService extends SpellCheckerService // or several pools, but it is shielded against multiple closing and it's // safe to call it several times. final Dictionary dictToClose = mContactsDictionary; // TODO: revert to the concrete type when USE_BINARY_CONTACTS_DICTIONARY is no // longer needed // TODO: revert to the concrete type when USE_BINARY_CONTACTS_DICTIONARY // is no longer needed mContactsDictionary = null; dictToClose.close(); } } } }.start(); } private DictionaryPool getDictionaryPool(final String locale) { DictionaryPool pool = mDictionaryPools.get(locale); Loading Loading
java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +25 −20 Original line number Diff line number Diff line Loading @@ -372,6 +372,9 @@ public class AndroidSpellCheckerService extends SpellCheckerService mUserDictionaries = Collections.synchronizedMap(new TreeMap<String, Dictionary>()); final Map<String, Dictionary> oldWhitelistDictionaries = mWhitelistDictionaries; mWhitelistDictionaries = Collections.synchronizedMap(new TreeMap<String, Dictionary>()); new Thread("spellchecker_close_dicts") { @Override public void run() { for (DictionaryPool pool : oldPools.values()) { pool.close(); } Loading @@ -387,13 +390,15 @@ public class AndroidSpellCheckerService extends SpellCheckerService // or several pools, but it is shielded against multiple closing and it's // safe to call it several times. final Dictionary dictToClose = mContactsDictionary; // TODO: revert to the concrete type when USE_BINARY_CONTACTS_DICTIONARY is no // longer needed // TODO: revert to the concrete type when USE_BINARY_CONTACTS_DICTIONARY // is no longer needed mContactsDictionary = null; dictToClose.close(); } } } }.start(); } private DictionaryPool getDictionaryPool(final String locale) { DictionaryPool pool = mDictionaryPools.get(locale); Loading