Merge "Remove researcher logger"
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index 23f8a24..096b946 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -318,18 +318,18 @@
                 ++len;
             }
             if (len > 0) {
-                final int kindAndFlags = mOutputTypes[j];
-                if (blockOffensiveWords
-                        && 0 != (kindAndFlags & SuggestedWordInfo.KIND_FLAG_POSSIBLY_OFFENSIVE)
-                        && 0 == (kindAndFlags & SuggestedWordInfo.KIND_FLAG_EXACT_MATCH)) {
+                final SuggestedWordInfo suggestedWordInfo =
+                        new SuggestedWordInfo(new String(mOutputCodePoints, start, len),
+                                mOutputScores[j], mOutputTypes[j], this /* sourceDict */,
+                                mSpaceIndices[j] /* indexOfTouchPointOfSecondWord */,
+                                mOutputAutoCommitFirstWordConfidence[0]);
+                if (blockOffensiveWords && suggestedWordInfo.isPossiblyOffensive()
+                        && !suggestedWordInfo.isExactMatch()) {
                     // 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], kindAndFlags, this /* sourceDict */,
-                        mSpaceIndices[j] /* indexOfTouchPointOfSecondWord */,
-                        mOutputAutoCommitFirstWordConfidence[0]));
+                suggestions.add(suggestedWordInfo);
             }
         }
         return suggestions;
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java
index 09c6727..72461e1 100644
--- a/java/src/com/android/inputmethod/latin/SuggestedWords.java
+++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java
@@ -296,16 +296,15 @@
         }
 
         public boolean isPossiblyOffensive() {
-            return (mKindAndFlags & SuggestedWordInfo.KIND_FLAG_POSSIBLY_OFFENSIVE) != 0;
+            return (mKindAndFlags & KIND_FLAG_POSSIBLY_OFFENSIVE) != 0;
         }
 
         public boolean isExactMatch() {
-            return (mKindAndFlags & SuggestedWordInfo.KIND_FLAG_EXACT_MATCH) != 0;
+            return (mKindAndFlags & KIND_FLAG_EXACT_MATCH) != 0;
         }
 
         public boolean isExactMatchWithIntentionalOmission() {
-            return (mKindAndFlags
-                    & SuggestedWordInfo.KIND_FLAG_EXACT_MATCH_WITH_INTENTIONAL_OMISSION) != 0;
+            return (mKindAndFlags & KIND_FLAG_EXACT_MATCH_WITH_INTENTIONAL_OMISSION) != 0;
         }
 
         public void setDebugString(final String str) {
diff --git a/tests/src/com/android/inputmethod/latin/ShiftModeTests.java b/tests/src/com/android/inputmethod/latin/ShiftModeTests.java
index 95851f3..a319ffd 100644
--- a/tests/src/com/android/inputmethod/latin/ShiftModeTests.java
+++ b/tests/src/com/android/inputmethod/latin/ShiftModeTests.java
@@ -111,7 +111,7 @@
         assertTrue("(Spanish) Auto caps after inverted bang", isCapsModeAutoShifted());
     }
 
-    public void testOtherSentenceSeparators() {
+    public void DISABLED_testOtherSentenceSeparators() {
         // We only run this test on Kitkat+ because previous versions of Android don't
         // have an Armenian locale. For some reason I don't know, when the requested
         // locale is not present as a device locale, then the application under test can't