diff options
author | 2011-12-28 18:33:39 +0900 | |
---|---|---|
committer | 2012-01-11 18:18:51 +0900 | |
commit | 903e58886e480d79b37c0f9347771042324e71a9 (patch) | |
tree | 02bb59e2fe2bfe014e85cb8c29c20d5a8c17c761 /tools/makedict/src/com/android/inputmethod/latin/BinaryDictInputOutput.java | |
parent | b751dbb6c8505e717db9b0db223bed24dc06d2f7 (diff) | |
download | latinime-903e58886e480d79b37c0f9347771042324e71a9.tar.gz latinime-903e58886e480d79b37c0f9347771042324e71a9.tar.xz latinime-903e58886e480d79b37c0f9347771042324e71a9.zip |
Add internal structure support for isShortcutOnly (B8)
Change-Id: Iaac80937540a45849c347f80400762032b27c82c
Diffstat (limited to 'tools/makedict/src/com/android/inputmethod/latin/BinaryDictInputOutput.java')
-rw-r--r-- | tools/makedict/src/com/android/inputmethod/latin/BinaryDictInputOutput.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/makedict/src/com/android/inputmethod/latin/BinaryDictInputOutput.java b/tools/makedict/src/com/android/inputmethod/latin/BinaryDictInputOutput.java index b7826f065..fcbb645f5 100644 --- a/tools/makedict/src/com/android/inputmethod/latin/BinaryDictInputOutput.java +++ b/tools/makedict/src/com/android/inputmethod/latin/BinaryDictInputOutput.java @@ -312,6 +312,13 @@ public class BinaryDictInputOutput { } /** + * Helper method to find out if a character info is a shortcut only. + */ + private static boolean isShortcutOnly(final CharGroupInfo info) { + return 0 != (info.mFlags & FLAG_IS_SHORTCUT_ONLY); + } + + /** * Compute the size, in bytes, that an address will occupy. * * This can be used either for children addresses (which are always positive) or for @@ -1027,10 +1034,11 @@ public class BinaryDictInputOutput { } nodeContents.add( new CharGroup(info.mCharacters, shortcutTargets, bigrams, info.mFrequency, - children)); + children, isShortcutOnly(info))); } else { nodeContents.add( - new CharGroup(info.mCharacters, shortcutTargets, bigrams, info.mFrequency)); + new CharGroup(info.mCharacters, shortcutTargets, bigrams, info.mFrequency, + isShortcutOnly(info))); } groupOffset = info.mEndAddress; } |