Merge "Update language to comply with Android's inclusive language guidance" am: 9490b1b92f am: 892eabe4c5 am: a2581fb80c

Original change: https://android-review.googlesource.com/c/platform/packages/inputmethods/LatinIME/+/1382602

Change-Id: Ia2ead878ea92eeed5048cf2cbfa6c2a80b8c6b20
diff --git a/java/res/values/config-auto-correction-thresholds.xml b/java/res/values/config-auto-correction-thresholds.xml
index fc701c7..668f90e 100644
--- a/java/res/values/config-auto-correction-thresholds.xml
+++ b/java/res/values/config-auto-correction-thresholds.xml
@@ -37,7 +37,7 @@
     <!-- Chosen to be slightly less than the "aggressive" threshold. This is the threshold for
          a mildly plausible suggestion given the input; if no "plausible" suggestion is present
          for a language, it's a strong indicator the user is not typing in this language, so we
-         may be more forgiving of whitelist entries in another language. -->
+         may be more forgiving of allowlist entries in another language. -->
     <string name="plausibility_threshold" translatable="false">0.065</string>
 
     <!-- The index of the auto correction threshold values array. -->
diff --git a/java/res/values/emoji-categories.xml b/java/res/values/emoji-categories.xml
index ce82a8b..ae5ccc7 100644
--- a/java/res/values/emoji-categories.xml
+++ b/java/res/values/emoji-categories.xml
@@ -22,7 +22,7 @@
      There is another emoji code point list for JB-MR2 and KLP and later under
      res/xml/values-v1[89].-->
 <resources>
-    <!-- Dummy codeArrays for recents emoji keyboard.
+    <!-- Placeholder codeArrays for recents emoji keyboard.
          Do not remove these keys, because they are used as a template. -->
     <array
         name="emoji_recents"
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
index 1fe0a4c..648610c 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
@@ -523,7 +523,7 @@
         }
 
         // Read from metadata file in resources to get the baseline dictionary info.
-        // This ensures we start with a sane list of available dictionaries.
+        // This ensures we start with a valid list of available dictionaries.
         final int metadataResourceId = context.getResources().getIdentifier("metadata",
                 "raw", DictionaryInfoUtils.RESOURCE_PACKAGE_NAME);
         if (metadataResourceId == 0) {
diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java b/java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java
index 9520426..b40866c 100644
--- a/java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java
+++ b/java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java
@@ -190,7 +190,7 @@
                     false /* isAuxiliary */, false /* overridesImplicitlyEnabledSubtype */,
                     SUBTYPE_ID_OF_PLACEHOLDER_NO_LANGUAGE_SUBTYPE));
     // Caveat: We probably should remove this when we add an Emoji subtype in {@link R.xml.method}.
-    // Dummy Emoji subtype. See {@link R.xml.method}.
+    // Placeholder Emoji subtype. See {@link R.xml.method}.
     private static final int SUBTYPE_ID_OF_PLACEHOLDER_EMOJI_SUBTYPE = 0xd78b2ed0;
     private static final String EXTRA_VALUE_OF_PLACEHOLDER_EMOJI_SUBTYPE =
             "KeyboardLayoutSet=" + SubtypeLocaleUtils.EMOJI
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 7ccefd2..da23617 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -225,7 +225,7 @@
                 // TODO: now that we have personalization, we may want to re-evaluate this decision
                 || !mDictionaryFacilitator.hasAtLeastOneInitializedMainDictionary()
                 // If the first suggestion is a shortcut we never auto-correct to it, regardless
-                // of how strong it is (whitelist entries are not KIND_SHORTCUT but KIND_WHITELIST).
+                // of how strong it is (allowlist entries are not KIND_SHORTCUT but KIND_WHITELIST).
                 // TODO: we may want to have shortcut-only entries auto-correct in the future.
                 || suggestionResults.first().isKindOf(SuggestedWordInfo.KIND_SHORTCUT)) {
             hasAutoCorrection = false;
diff --git a/native/jni/src/dictionary/header/header_policy.cpp b/native/jni/src/dictionary/header/header_policy.cpp
index d4f84d3..173cfd9 100644
--- a/native/jni/src/dictionary/header/header_policy.cpp
+++ b/native/jni/src/dictionary/header/header_policy.cpp
@@ -105,7 +105,7 @@
             &writingPos)) {
         return false;
     }
-    // Temporarily writes a dummy header size.
+    // Temporarily writes a placeholder header size.
     int headerSizeFieldPos = writingPos;
     if (!HeaderReadWriteUtils::writeDictionaryHeaderSize(outBuffer, 0 /* size */,
             &writingPos)) {
diff --git a/native/jni/src/dictionary/header/header_policy.h b/native/jni/src/dictionary/header/header_policy.h
index 47cc919..1b37575 100644
--- a/native/jni/src/dictionary/header/header_policy.h
+++ b/native/jni/src/dictionary/header/header_policy.h
@@ -97,7 +97,7 @@
                       headerPolicy->mForgettingCurveProbabilityValuesTableId),
               mCodePointTable(headerPolicy->mCodePointTable) {}
 
-    // Temporary dummy header.
+    // Temporary placeholder header.
     HeaderPolicy()
             : mDictFormatVersion(FormatUtils::UNKNOWN_VERSION), mDictionaryFlags(0), mSize(0),
               mAttributeMap(), mLocale(CharUtils::EMPTY_STRING), mMultiWordCostMultiplier(0.0f),
diff --git a/native/jni/src/dictionary/structure/backward/v402/content/probability_dict_content.cpp b/native/jni/src/dictionary/structure/backward/v402/content/probability_dict_content.cpp
index b167f0a..587a1c0 100644
--- a/native/jni/src/dictionary/structure/backward/v402/content/probability_dict_content.cpp
+++ b/native/jni/src/dictionary/structure/backward/v402/content/probability_dict_content.cpp
@@ -69,7 +69,7 @@
         // Write new entry.
         int writingPos = getBuffer()->getTailPosition();
         while (writingPos <= entryPos) {
-            // Fulfilling with dummy entries until writingPos.
+            // Fulfilling with placeholder entries until writingPos.
             if (!writeEntry(&dummyEntry, writingPos)) {
                 AKLOGE("Cannot write dummy entry. pos: %d, mSize: %d", writingPos, mSize);
                 return false;
diff --git a/native/jni/src/dictionary/structure/backward/v402/content/probability_entry.h b/native/jni/src/dictionary/structure/backward/v402/content/probability_entry.h
index 94e36bf..68176a4 100644
--- a/native/jni/src/dictionary/structure/backward/v402/content/probability_entry.h
+++ b/native/jni/src/dictionary/structure/backward/v402/content/probability_entry.h
@@ -38,7 +38,7 @@
             : mFlags(probabilityEntry.mFlags), mProbability(probabilityEntry.mProbability),
               mHistoricalInfo(probabilityEntry.mHistoricalInfo) {}
 
-    // Dummy entry
+    // Placeholder entry
     ProbabilityEntry()
             : mFlags(0), mProbability(NOT_A_PROBABILITY), mHistoricalInfo() {}
 
diff --git a/native/jni/src/dictionary/structure/backward/v402/ver4_patricia_trie_node_writer.cpp b/native/jni/src/dictionary/structure/backward/v402/ver4_patricia_trie_node_writer.cpp
index e3ab5ec..075dc6d 100644
--- a/native/jni/src/dictionary/structure/backward/v402/ver4_patricia_trie_node_writer.cpp
+++ b/native/jni/src/dictionary/structure/backward/v402/ver4_patricia_trie_node_writer.cpp
@@ -339,7 +339,7 @@
         const PtNodeParams *const ptNodeParams, int *const outTerminalId,
         int *const ptNodeWritingPos) {
     const int nodePos = *ptNodeWritingPos;
-    // Write dummy flags. The Node flags are updated with appropriate flags at the last step of the
+    // Write placeholder flags. The Node flags are updated with appropriate flags at the last step of the
     // PtNode writing.
     if (!DynamicPtWritingUtils::writeFlagsAndAdvancePosition(mTrieBuffer,
             0 /* nodeFlags */, ptNodeWritingPos)) {
diff --git a/native/jni/src/dictionary/structure/pt_common/dynamic_pt_gc_event_listeners.cpp b/native/jni/src/dictionary/structure/pt_common/dynamic_pt_gc_event_listeners.cpp
index b5e2e9d..1b1be32 100644
--- a/native/jni/src/dictionary/structure/pt_common/dynamic_pt_gc_event_listeners.cpp
+++ b/native/jni/src/dictionary/structure/pt_common/dynamic_pt_gc_event_listeners.cpp
@@ -76,14 +76,14 @@
     return true;
 }
 
-// Writes dummy PtNode array size when the head of PtNode array is read.
+// Writes placeholder PtNode array size when the head of PtNode array is read.
 bool DynamicPtGcEventListeners::TraversePolicyToPlaceAndWriteValidPtNodesToBuffer
         ::onDescend(const int ptNodeArrayPos) {
     mValidPtNodeCount = 0;
     int writingPos = mBufferToWrite->getTailPosition();
     mDictPositionRelocationMap->mPtNodeArrayPositionRelocationMap.insert(
             PtNodeWriter::PtNodeArrayPositionRelocationMap::value_type(ptNodeArrayPos, writingPos));
-    // Writes dummy PtNode array size because arrays can have a forward link or needles PtNodes.
+    // Writes placeholder PtNode array size because arrays can have a forward link or needles PtNodes.
     // This field will be updated later in onReadingPtNodeArrayTail() with actual PtNode count.
     mPtNodeArraySizeFieldPos = writingPos;
     return DynamicPtWritingUtils::writePtNodeArraySizeAndAdvancePosition(
diff --git a/native/jni/src/dictionary/structure/pt_common/shortcut/shortcut_list_reading_utils.cpp b/native/jni/src/dictionary/structure/pt_common/shortcut/shortcut_list_reading_utils.cpp
index 14428ed..62ec3d8 100644
--- a/native/jni/src/dictionary/structure/pt_common/shortcut/shortcut_list_reading_utils.cpp
+++ b/native/jni/src/dictionary/structure/pt_common/shortcut/shortcut_list_reading_utils.cpp
@@ -27,7 +27,7 @@
 const ShortcutListReadingUtils::ShortcutFlags
         ShortcutListReadingUtils::MASK_ATTRIBUTE_PROBABILITY = 0x0F;
 const int ShortcutListReadingUtils::SHORTCUT_LIST_SIZE_FIELD_SIZE = 2;
-// The numeric value of the shortcut probability that means 'whitelist'.
+// The numeric value of the shortcut probability that means 'allowlist'.
 const int ShortcutListReadingUtils::WHITELIST_SHORTCUT_PROBABILITY = 15;
 
 /* static */ ShortcutListReadingUtils::ShortcutFlags
diff --git a/native/jni/src/dictionary/structure/v4/content/probability_entry.h b/native/jni/src/dictionary/structure/v4/content/probability_entry.h
index 473354b..8dd1fb0 100644
--- a/native/jni/src/dictionary/structure/v4/content/probability_entry.h
+++ b/native/jni/src/dictionary/structure/v4/content/probability_entry.h
@@ -34,7 +34,7 @@
             : mFlags(probabilityEntry.mFlags), mProbability(probabilityEntry.mProbability),
               mHistoricalInfo(probabilityEntry.mHistoricalInfo) {}
 
-    // Dummy entry
+    // Placeholder entry
     ProbabilityEntry()
             : mFlags(Ver4DictConstants::FLAG_NOT_A_VALID_ENTRY), mProbability(NOT_A_PROBABILITY),
               mHistoricalInfo() {}
diff --git a/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_node_writer.cpp b/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_node_writer.cpp
index d974b50..774bc02 100644
--- a/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_node_writer.cpp
+++ b/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_node_writer.cpp
@@ -286,7 +286,7 @@
         const PtNodeParams *const ptNodeParams, int *const outTerminalId,
         int *const ptNodeWritingPos) {
     const int nodePos = *ptNodeWritingPos;
-    // Write dummy flags. The Node flags are updated with appropriate flags at the last step of the
+    // Write placeholder flags. The Node flags are updated with appropriate flags at the last step of the
     // PtNode writing.
     if (!DynamicPtWritingUtils::writeFlagsAndAdvancePosition(mTrieBuffer,
             0 /* nodeFlags */, ptNodeWritingPos)) {
diff --git a/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h b/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h
index e14805e..3638f38 100644
--- a/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h
+++ b/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h
@@ -41,7 +41,7 @@
     }
 
     // Gets the shortcut target itself as an int string and put it to outTarget, put its length
-    // to outTargetLength, put whether it is whitelist to outIsWhitelist.
+    // to outTargetLength, put whether it is allowlist to outIsWhitelist.
     AK_FORCE_INLINE void nextShortcutTarget(
             const int maxDepth, int *const outTarget, int *const outTargetLength,
             bool *const outIsWhitelist) {
diff --git a/tests/res/raw/dummy_resource_for_testing.txt b/tests/res/raw/dummy_resource_for_testing.txt
index 05da86b..88e64fd 100644
--- a/tests/res/raw/dummy_resource_for_testing.txt
+++ b/tests/res/raw/dummy_resource_for_testing.txt
@@ -1,3 +1,3 @@
-/* This dummy raw resource is needed to be able to load string resources from a test APK
+/* This placeholder raw resource is needed to be able to load string resources from a test APK
  * successfully. (See {@link KeySpecParserSplitTests#setUp()}.
  */
diff --git a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
index a0544d6..e3fb30d 100644
--- a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
+++ b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
@@ -51,7 +51,7 @@
     }
 
     /**
-     * Helper method to create a dummy {@link SuggestedWordInfo}.
+     * Helper method to create a placeholder {@link SuggestedWordInfo}.
      *
      * @param kindAndFlags the kind and flags to be used to create {@link SuggestedWordInfo}.
      * @param word the word to be used to create {@link SuggestedWordInfo}.
diff --git a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
index 92bff0e..b41c701 100644
--- a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
+++ b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
@@ -36,7 +36,7 @@
 public class SuggestedWordsTests {
 
     /**
-     * Helper method to create a dummy {@link SuggestedWordInfo} with specifying
+     * Helper method to create a placeholder {@link SuggestedWordInfo} with specifying
      * {@link SuggestedWordInfo#KIND_TYPED}.
      *
      * @param word the word to be used to create {@link SuggestedWordInfo}.
@@ -53,7 +53,7 @@
     }
 
     /**
-     * Helper method to create a dummy {@link SuggestedWordInfo} with specifying
+     * Helper method to create a placeholder {@link SuggestedWordInfo} with specifying
      * {@link SuggestedWordInfo#KIND_CORRECTION}.
      *
      * @param word the word to be used to create {@link SuggestedWordInfo}.
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
index bd51365..2ae5bf5 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
@@ -446,7 +446,7 @@
     }
 
     /**
-     * Sanity-checking method.
+     * Validity-checking method.
      *
      * This method checks a list of PtNode arrays for juxtaposition, that is, it will do
      * nothing if each node array's cached address is actually the previous node array's address
@@ -664,7 +664,7 @@
                         + "of the node : " + dictEncoder.getPosition() + " <> "
                         + ptNode.mCachedAddressAfterUpdate);
             }
-            // Sanity checks.
+            // Validity checks.
             if (DBG && ptNode.getProbability() > FormatSpec.MAX_TERMINAL_FREQUENCY) {
                 throw new RuntimeException("A node has a frequency > "
                         + FormatSpec.MAX_TERMINAL_FREQUENCY
diff --git a/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java b/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
index 6ba1ef9..2bed44d 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
@@ -277,7 +277,7 @@
     }
 
     /**
-     * Sanity check for a PtNode array.
+     * Validity check for a PtNode array.
      *
      * This method checks that all PtNodes in a node array are ordered as expected.
      * If they are, nothing happens. If they aren't, an exception is thrown.
diff --git a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java
index 4b7b9bc..d3ea270 100644
--- a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java
+++ b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java
@@ -37,7 +37,7 @@
 public class UserHistoryDictionaryTestsHelper {
 
     /**
-     * Locale prefix for generating dummy locales for tests.
+     * Locale prefix for generating placeholder locales for tests.
      */
     public static final String TEST_LOCALE_PREFIX = "test-";