Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 971bbcf5 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi
Browse files

Fix historical info of bigrams reading.

Bug: 12809791
Change-Id: I879279a0d0e1007a7c6cb87a627bf046340dda98
parent 0c186c31
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -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;