diff options
author | 2014-05-28 20:35:45 +0900 | |
---|---|---|
committer | 2014-05-28 20:35:45 +0900 | |
commit | 4bffac6db9e5800ecc58ba12d86b98a184779eba (patch) | |
tree | 19f73e5258a0a044d99864f71d34d813af7328e5 /java/src/com/android/inputmethod/latin/BinaryDictionary.java | |
parent | f2b995769bf55b07797e05b4474457f910d5aa7a (diff) | |
download | latinime-4bffac6db9e5800ecc58ba12d86b98a184779eba.tar.gz latinime-4bffac6db9e5800ecc58ba12d86b98a184779eba.tar.xz latinime-4bffac6db9e5800ecc58ba12d86b98a184779eba.zip |
Stop directly checking SuggestedWordInfo.mKind
Bug: 15298959
Change-Id: Iba6eeb7981634e7ddb896404978b30f6efd6e72f
Diffstat (limited to 'java/src/com/android/inputmethod/latin/BinaryDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/BinaryDictionary.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java index fd34b98f4..23f8a249a 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java @@ -318,16 +318,16 @@ public final class BinaryDictionary extends Dictionary { ++len; } if (len > 0) { - final int flags = mOutputTypes[j] & SuggestedWordInfo.KIND_MASK_FLAGS; + final int kindAndFlags = mOutputTypes[j]; if (blockOffensiveWords - && 0 != (flags & SuggestedWordInfo.KIND_FLAG_POSSIBLY_OFFENSIVE) - && 0 == (flags & SuggestedWordInfo.KIND_FLAG_EXACT_MATCH)) { + && 0 != (kindAndFlags & SuggestedWordInfo.KIND_FLAG_POSSIBLY_OFFENSIVE) + && 0 == (kindAndFlags & SuggestedWordInfo.KIND_FLAG_EXACT_MATCH)) { // If we block potentially offensive words, and if the word is possibly // offensive, then we don't output it unless it's also an exact match. continue; } suggestions.add(new SuggestedWordInfo(new String(mOutputCodePoints, start, len), - mOutputScores[j], mOutputTypes[j], this /* sourceDict */, + mOutputScores[j], kindAndFlags, this /* sourceDict */, mSpaceIndices[j] /* indexOfTouchPointOfSecondWord */, mOutputAutoCommitFirstWordConfidence[0])); } |