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
This commit is contained in:
Jean Chalard 2012-08-10 12:02:16 +09:00
parent 1d8103ea57
commit 565fdeee7d

View file

@ -90,6 +90,10 @@ public class XmlDictInputOutput {
public FusionDictionary getFinalDictionary() { public FusionDictionary getFinalDictionary() {
final FusionDictionary dict = mDictionary; final FusionDictionary dict = mDictionary;
for (final String shortcutOnly : mShortcutsMap.keySet()) {
if (dict.hasWord(shortcutOnly)) continue;
dict.add(shortcutOnly, 0, mShortcutsMap.get(shortcutOnly));
}
mDictionary = null; mDictionary = null;
mShortcutsMap.clear(); mShortcutsMap.clear();
mWord = ""; mWord = "";