diff options
author | 2009-12-08 10:07:42 -0800 | |
---|---|---|
committer | 2009-12-08 10:07:42 -0800 | |
commit | 24c1ff4993734a1475d98a3456b8cbae4e16204e (patch) | |
tree | 01fb6baeb3507ec3c661e7097d169f8abb528659 /src | |
parent | 82c68bfbfc9442ebb7d8be842aaf8dedf5ffc76e (diff) | |
parent | 5b63c38d1fc9e42348a8a90edf8dce6103f72864 (diff) | |
download | latinime-24c1ff4993734a1475d98a3456b8cbae4e16204e.tar.gz latinime-24c1ff4993734a1475d98a3456b8cbae4e16204e.tar.xz latinime-24c1ff4993734a1475d98a3456b8cbae4e16204e.zip |
am 5b63c38d: Fix 2306814: Too aggressive suggesting names from my contacts list.
Merge commit '5b63c38d1fc9e42348a8a90edf8dce6103f72864' into eclair-mr2
* commit '5b63c38d1fc9e42348a8a90edf8dce6103f72864':
Fix 2306814: Too aggressive suggesting names from my contacts list.
Diffstat (limited to 'src')
-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) { |