From 6a2a4b8e4d0dee1564e59632b07a131d55d949d8 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 12 Apr 2013 16:17:09 +0900 Subject: Make shortcut-only user dict entry non-words. Bug: 7369456 Change-Id: Iecd6f6d617f31bd2aa6749516711aeb1f0549622 --- .../com/android/inputmethod/latin/ExpandableBinaryDictionary.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java') diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java index 97dc6a8ac..4b1975a00 100644 --- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java @@ -176,14 +176,15 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { */ // TODO: Create "cache dictionary" to cache fresh words for frequently updated dictionaries, // considering performance regression. - protected void addWord(final String word, final String shortcutTarget, final int frequency) { + protected void addWord(final String word, final String shortcutTarget, final int frequency, + final boolean isNotAWord) { if (shortcutTarget == null) { - mFusionDictionary.add(word, frequency, null, false /* isNotAWord */); + mFusionDictionary.add(word, frequency, null, isNotAWord); } else { // TODO: Do this in the subclass, with this class taking an arraylist. final ArrayList shortcutTargets = CollectionUtils.newArrayList(); shortcutTargets.add(new WeightedString(shortcutTarget, frequency)); - mFusionDictionary.add(word, frequency, shortcutTargets, false /* isNotAWord */); + mFusionDictionary.add(word, frequency, shortcutTargets, isNotAWord); } } -- cgit v1.2.3-83-g751a