aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-01-30 16:19:22 +0900
committerKeisuke Kuroyanagi <ksk@google.com>2014-01-30 16:19:22 +0900
commit971bbcf562147eb3bc4ca503fa61f267a6d1e771 (patch)
treef88b25b292d7dd63d94d1d43754d6a3403386466 /java/src
parent0c186c31d2dcb69a5d59afe0107878544a706c7b (diff)
downloadlatinime-971bbcf562147eb3bc4ca503fa61f267a6d1e771.tar.gz
latinime-971bbcf562147eb3bc4ca503fa61f267a6d1e771.tar.xz
latinime-971bbcf562147eb3bc4ca503fa61f267a6d1e771.zip
Fix historical info of bigrams reading.
Bug: 12809791 Change-Id: I879279a0d0e1007a7c6cb87a627bf046340dda98
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
index f23022992..e459e4861 100644
--- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
+++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
@@ -215,11 +215,12 @@ public class Ver4DictDecoder extends AbstractDictDecoder {
if (options.mHasTimestamp) {
probability = buffer.readUnsignedByte();
- final int pos = buffer.position();
- // Skip historical info.
- buffer.position(pos + FormatSpec.BIGRAM_TIMESTAMP_SIZE
- + FormatSpec.BIGRAM_LEVEL_SIZE
- + FormatSpec.BIGRAM_COUNTER_SIZE);
+ // Skip timestamp
+ buffer.readInt();
+ // Skip level
+ buffer.readUnsignedByte();
+ // Skip count
+ buffer.readUnsignedByte();
} else {
probability = bigramFlags
& FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_FREQUENCY;