am 7ceee453: Merge "Fix historical info of bigrams reading."

* commit '7ceee45376d104a79723aa2aaeb30057e6f7e513':
  Fix historical info of bigrams reading.
main
Keisuke Kuroyanagi 2014-01-30 00:24:34 -08:00 committed by Android Git Automerger
commit 81fa5dbd09
1 changed files with 6 additions and 5 deletions

View File

@ -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;