diff options
author | 2010-01-12 15:19:19 -0800 | |
---|---|---|
committer | 2010-01-12 15:19:19 -0800 | |
commit | 0477aa161410b2a2bc5d7545499471557ad01cb8 (patch) | |
tree | 9435c01377dae1a21343d2db4e5decec0b73abd6 /src/com/android/inputmethod/latin/ExpandableDictionary.java | |
parent | 68eb1b1932f77a34d13d0ec0ab2d76cd50fdda92 (diff) | |
download | latinime-0477aa161410b2a2bc5d7545499471557ad01cb8.tar.gz latinime-0477aa161410b2a2bc5d7545499471557ad01cb8.tar.xz latinime-0477aa161410b2a2bc5d7545499471557ad01cb8.zip |
android-2.1_r1 snapshot
Diffstat (limited to 'src/com/android/inputmethod/latin/ExpandableDictionary.java')
-rw-r--r-- | src/com/android/inputmethod/latin/ExpandableDictionary.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/inputmethod/latin/ExpandableDictionary.java b/src/com/android/inputmethod/latin/ExpandableDictionary.java index a136ee7f4..1589168ee 100644 --- a/src/com/android/inputmethod/latin/ExpandableDictionary.java +++ b/src/com/android/inputmethod/latin/ExpandableDictionary.java @@ -105,8 +105,8 @@ public class ExpandableDictionary extends Dictionary { if (wordLength == depth + 1) { // Terminate this word childNode.terminal = true; - childNode.frequency += frequency; // If there are multiple similar words - if (childNode.frequency > 256) childNode.frequency = 256; + childNode.frequency = Math.max(frequency, childNode.frequency); + if (childNode.frequency > 255) childNode.frequency = 255; return; } if (childNode.children == null) { |