From 14ea11fcde23a8a1a586d5691de79a70f66e2639 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 28 May 2014 11:51:05 +0900 Subject: [PATCH] Add TODO comment about SuggestedWordInfo's kind and flags This CL must be checked in together with I6fd87e1eec. Change-Id: I4b24157f3e3ce6327579d37122a34d7a30069885 --- java/src/com/android/inputmethod/latin/SuggestedWords.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 23a6086ef..62da0f992 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -207,6 +207,8 @@ public class SuggestedWords { public static final int NOT_AN_INDEX = -1; public static final int NOT_A_CONFIDENCE = -1; public static final int MAX_SCORE = Integer.MAX_VALUE; + + // TODO: Make KIND_MASK_KIND private. public static final int KIND_MASK_KIND = 0xFF; // Mask to get only the kind public static final int KIND_TYPED = 0; // What user typed public static final int KIND_CORRECTION = 1; // Simple correction/suggestion @@ -222,6 +224,7 @@ public class SuggestedWords { public static final int KIND_RESUMED = 9; public static final int KIND_OOV_CORRECTION = 10; // Most probable string correction + // TODO: Make KIND_MASK_FLAGS private. public static final int KIND_MASK_FLAGS = 0xFFFFFF00; // Mask to get the flags public static final int KIND_FLAG_POSSIBLY_OFFENSIVE = 0x80000000; public static final int KIND_FLAG_EXACT_MATCH = 0x40000000; @@ -232,6 +235,7 @@ public class SuggestedWords { // the application (including keyboard-computed ones, so this is almost always null) public final CompletionInfo mApplicationSpecifiedCompletionInfo; public final int mScore; + // TODO: Rename to mKindAndFlags and make this private. public final int mKind; // kind and kind flags public final int mCodePointCount; public final Dictionary mSourceDict; @@ -290,6 +294,8 @@ public class SuggestedWords { return (mKind & KIND_MASK_KIND) == kind; } + // TODO: Add predicate methods for each flag. + public void setDebugString(final String str) { if (null == str) throw new NullPointerException("Debug info is null"); mDebugString = str;