diff options
author | 2012-05-15 11:37:54 -0700 | |
---|---|---|
committer | 2012-05-15 11:37:54 -0700 | |
commit | 848081ad8bd190ec522a0617af4eb593ccd370e6 (patch) | |
tree | 0b5b7be491ddeaaa8e2ccad2eb8074f4f3ef386a /java/src/com/android/inputmethod/latin/UserHistoryDictionary.java | |
parent | a72b809892e62340900f51391e8a6b29e8b2ab19 (diff) | |
parent | 8dced70b062744a2c27e0cf6dcd0787cf598a97c (diff) | |
download | latinime-848081ad8bd190ec522a0617af4eb593ccd370e6.tar.gz latinime-848081ad8bd190ec522a0617af4eb593ccd370e6.tar.xz latinime-848081ad8bd190ec522a0617af4eb593ccd370e6.zip |
am 8dced70b: Merge "Read and use user dictionary shortcuts." into jb-dev
* commit '8dced70b062744a2c27e0cf6dcd0787cf598a97c':
Read and use user dictionary shortcuts.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/UserHistoryDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/UserHistoryDictionary.java | 4 |
1 files changed, 2 insertions, 2 deletions
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); |