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

Commit 99b84b42 authored by Jean Chalard's avatar Jean Chalard
Browse files

Use a freq of 1 instead of 0 for non-word shortcuts.

Also fix a spelling mistake in a comment

Bug: 7301525
Change-Id: I4437403dce620fed03871485ee04f13c51ce34fc
parent 2e3f261d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -350,7 +350,7 @@ final class BinaryDictionaryGetter {
    // of the dictionary would lose whitelist functionality.
    private static boolean hackCanUseDictionaryFile(final Locale locale, final File f) {
        // Only for English - other languages didn't have a whitelist, hence this
        // ad-hock ## HACK ##
        // ad-hoc ## HACK ##
        if (!Locale.ENGLISH.getLanguage().equals(locale.getLanguage())) return true;

        FileInputStream inStream = null;
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public class XmlDictInputOutput {
            final FusionDictionary dict = mDictionary;
            for (final String shortcutOnly : mShortcutsMap.keySet()) {
                if (dict.hasWord(shortcutOnly)) continue;
                dict.add(shortcutOnly, 0, mShortcutsMap.get(shortcutOnly), true /* isNotAWord */);
                dict.add(shortcutOnly, 1, mShortcutsMap.get(shortcutOnly), true /* isNotAWord */);
            }
            mDictionary = null;
            mShortcutsMap.clear();