aboutsummaryrefslogtreecommitdiffstats
path: root/tools/makedict/src/com/android/inputmethod/latin/BinaryDictInputOutput.java
diff options
context:
space:
mode:
Diffstat (limited to 'tools/makedict/src/com/android/inputmethod/latin/BinaryDictInputOutput.java')
-rw-r--r--tools/makedict/src/com/android/inputmethod/latin/BinaryDictInputOutput.java12
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;
}