aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-01-30 00:24:34 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-30 00:24:34 -0800
commit81fa5dbd09cf367209f31e90477eb1355c93e212 (patch)
tree6586a2800f2605804b2e243dcc0ea3acfe614d41 /java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
parent6ab076e24424f75b8ee61492b774b04ef6e978fa (diff)
parent7ceee45376d104a79723aa2aaeb30057e6f7e513 (diff)
downloadlatinime-81fa5dbd09cf367209f31e90477eb1355c93e212.tar.gz
latinime-81fa5dbd09cf367209f31e90477eb1355c93e212.tar.xz
latinime-81fa5dbd09cf367209f31e90477eb1355c93e212.zip
am 7ceee453: Merge "Fix historical info of bigrams reading."
* commit '7ceee45376d104a79723aa2aaeb30057e6f7e513': Fix historical info of bigrams reading.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java')
-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;