From 19ad9bf1457af47d98d6464392ca2e1c431f9d1f Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 11 May 2012 16:33:01 +0900 Subject: Read and use user dictionary shortcuts. Bug: 4646172 Change-Id: I51002c73d5bad1a698110c5cda02253348be8eed --- java/src/com/android/inputmethod/latin/UserHistoryDictionary.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/UserHistoryDictionary.java') diff --git a/java/src/com/android/inputmethod/latin/UserHistoryDictionary.java b/java/src/com/android/inputmethod/latin/UserHistoryDictionary.java index 9191aa953..e13602e50 100644 --- a/java/src/com/android/inputmethod/latin/UserHistoryDictionary.java +++ b/java/src/com/android/inputmethod/latin/UserHistoryDictionary.java @@ -176,7 +176,7 @@ public class UserHistoryDictionary extends ExpandableDictionary { * The second word may not be null (a NullPointerException would be thrown). */ public int addToUserHistory(final String word1, String word2) { - super.addWord(word2, FREQUENCY_FOR_TYPED); + super.addWord(word2, null /* shortcut */, FREQUENCY_FOR_TYPED); // Do not insert a word as a bigram of itself if (word2.equals(word1)) { return 0; @@ -246,7 +246,7 @@ public class UserHistoryDictionary extends ExpandableDictionary { // Safeguard against adding really long words. Stack may overflow due // to recursive lookup if (null == word1) { - super.addWord(word2, frequency); + super.addWord(word2, null /* shortcut */, frequency); } else if (word1.length() < BinaryDictionary.MAX_WORD_LENGTH && word2.length() < BinaryDictionary.MAX_WORD_LENGTH) { super.setBigram(word1, word2, frequency); -- cgit v1.2.3-83-g751a