From 565fdeee7d989391c4624d2d612da2f0aba6a12e Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 10 Aug 2012 12:02:16 +0900 Subject: [PATCH] Reinstate putting shortcut-only entries in the dictionary Not sure at which point this functionality got lost, but anyway, it's back Bug: 6906525 Change-Id: Ie87baa0dacdcee90e029917ca866099593d5d048 --- .../inputmethod/latin/dicttool/XmlDictInputOutput.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/dicttool/src/android/inputmethod/latin/dicttool/XmlDictInputOutput.java b/tools/dicttool/src/android/inputmethod/latin/dicttool/XmlDictInputOutput.java index 9ab56d797..9ce8c4934 100644 --- a/tools/dicttool/src/android/inputmethod/latin/dicttool/XmlDictInputOutput.java +++ b/tools/dicttool/src/android/inputmethod/latin/dicttool/XmlDictInputOutput.java @@ -90,6 +90,10 @@ public class XmlDictInputOutput { public FusionDictionary getFinalDictionary() { final FusionDictionary dict = mDictionary; + for (final String shortcutOnly : mShortcutsMap.keySet()) { + if (dict.hasWord(shortcutOnly)) continue; + dict.add(shortcutOnly, 0, mShortcutsMap.get(shortcutOnly)); + } mDictionary = null; mShortcutsMap.clear(); mWord = "";