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

Commit d2cd3d54 authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Split a method for reuse"

parents 400ff86c 84036119
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -353,6 +353,11 @@ public class AndroidSpellCheckerService extends SpellCheckerService

    @Override
    public boolean onUnbind(final Intent intent) {
        closeAllDictionaries();
        return false;
    }

    private void closeAllDictionaries() {
        final Map<String, DictionaryPool> oldPools = mDictionaryPools;
        mDictionaryPools = Collections.synchronizedMap(new TreeMap<String, DictionaryPool>());
        final Map<String, Dictionary> oldUserDictionaries = mUserDictionaries;
@@ -378,7 +383,6 @@ public class AndroidSpellCheckerService extends SpellCheckerService
                dictToClose.close();
            }
        }
        return false;
    }

    private DictionaryPool getDictionaryPool(final String locale) {