AOSP/Messaging - Update language to comply with Android's inclusive language guidance.

See https://source.android.com/setup/contribute/respectful-code for reference

BUG=161896447

Test: make and make messagingtests
Change-Id: I01c520f1d5e9eab8dbb25b08d133ae34bd301093
diff --git a/jni/GifTranscoder.cpp b/jni/GifTranscoder.cpp
index 9169f1b..324d315 100644
--- a/jni/GifTranscoder.cpp
+++ b/jni/GifTranscoder.cpp
@@ -173,7 +173,7 @@
                     return false;
                 }
 
-                // Sanity-check the current image position.
+                // Check the current image position.
                 if (gifIn->Image.Left < 0 ||
                         gifIn->Image.Top < 0 ||
                         gifIn->Image.Left + gifIn->Image.Width > gifIn->SWidth ||
diff --git a/res/values/constants.xml b/res/values/constants.xml
index 8985fd1..e494e95 100644
--- a/res/values/constants.xml
+++ b/res/values/constants.xml
@@ -33,7 +33,7 @@
     <string name="advanced_pref_key" translatable="false">advanced_prefs</string>
 
     <!-- Subscription-specific settings. The values of these pref keys must be prefixed with
-         "buglesub_" to allow for runtime sanity checks -->
+         "buglesub_" to allow for runtime checks -->
     <string name="delivery_reports_pref_key" translatable="false">buglesub_delivery_reports</string>
     <bool name="delivery_reports_pref_default" translatable="false">false</bool>
     <string name="auto_retrieve_mms_pref_key" translatable="false">buglesub_auto_retrieve_mms</string>
diff --git a/src/com/android/messaging/datamodel/DatabaseHelper.java b/src/com/android/messaging/datamodel/DatabaseHelper.java
index ed4a287..486973e 100644
--- a/src/com/android/messaging/datamodel/DatabaseHelper.java
+++ b/src/com/android/messaging/datamodel/DatabaseHelper.java
@@ -49,10 +49,13 @@
         return Integer.parseInt(context.getResources().getString(R.string.database_version));
     }
 
-    /** Table containing names of all other tables and views */
-    private static final String MASTER_TABLE = "sqlite_master";
+    /**
+     * Table containing names of all other tables and views.
+     * TODO(rtenneti): Fix the following special SQLLite table name when SQLLite changes.
+     */
+    private static final String PRIMARY_TABLE = "sqlite_master";
     /** Column containing the name of the tables and views */
-    private static final String[] MASTER_COLUMNS = new String[] { "name", };
+    private static final String[] PRIMARY_COLUMNS = new String[] { "name", };
 
     // Table names
     public static final String CONVERSATIONS_TABLE = "conversations";
@@ -682,7 +685,7 @@
      */
     private static void dropAllTables(final SQLiteDatabase db) {
         final Cursor tableCursor =
-                db.query(MASTER_TABLE, MASTER_COLUMNS, "type='table'", null, null, null, null);
+                db.query(PRIMARY_TABLE, PRIMARY_COLUMNS, "type='table'", null, null, null, null);
         if (tableCursor != null) {
             try {
                 final String dropPrefix = "DROP TABLE IF EXISTS ";
@@ -713,7 +716,7 @@
      */
     private static void dropAllTriggers(final SQLiteDatabase db) {
         final Cursor triggerCursor =
-                db.query(MASTER_TABLE, MASTER_COLUMNS, "type='trigger'", null, null, null, null);
+                db.query(PRIMARY_TABLE, PRIMARY_COLUMNS, "type='trigger'", null, null, null, null);
         if (triggerCursor != null) {
             try {
                 final String dropPrefix = "DROP TRIGGER IF EXISTS ";
@@ -744,7 +747,7 @@
      */
     public static void dropAllViews(final SQLiteDatabase db) {
         final Cursor viewCursor =
-                db.query(MASTER_TABLE, MASTER_COLUMNS, "type='view'", null, null, null, null);
+                db.query(PRIMARY_TABLE, PRIMARY_COLUMNS, "type='view'", null, null, null, null);
         if (viewCursor != null) {
             try {
                 while (viewCursor.moveToNext()) {
@@ -762,7 +765,7 @@
      */
     private static void dropAllIndexes(final SQLiteDatabase db) {
         final Cursor indexCursor =
-                db.query(MASTER_TABLE, MASTER_COLUMNS, "type='index'", null, null, null, null);
+                db.query(PRIMARY_TABLE, PRIMARY_COLUMNS, "type='index'", null, null, null, null);
         if (indexCursor != null) {
             try {
                 final String dropPrefix = "DROP INDEX IF EXISTS ";
diff --git a/src/com/android/messaging/datamodel/data/ConversationData.java b/src/com/android/messaging/datamodel/data/ConversationData.java
index 55d5bfc..704e46f 100644
--- a/src/com/android/messaging/datamodel/data/ConversationData.java
+++ b/src/com/android/messaging/datamodel/data/ConversationData.java
@@ -780,8 +780,8 @@
     }
 
     /**
-     * A dummy implementation of {@link ConversationDataListener} so that subclasses may opt to
-     * implement some, but not all, of the interface methods.
+     * A placeholder implementation of {@link ConversationDataListener} so that subclasses may opt
+     * to implement some, but not all, of the interface methods.
      */
     public static class SimpleConversationDataListener implements ConversationDataListener {
 
diff --git a/src/com/android/messaging/datamodel/media/BindableMediaRequest.java b/src/com/android/messaging/datamodel/media/BindableMediaRequest.java
index 36521d5..d979323 100644
--- a/src/com/android/messaging/datamodel/media/BindableMediaRequest.java
+++ b/src/com/android/messaging/datamodel/media/BindableMediaRequest.java
@@ -19,7 +19,7 @@
 import com.android.messaging.datamodel.media.MediaResourceManager.MediaResourceLoadListener;
 
 /**
- * The {@link MediaRequest} interface is threading-model-blind, allowing the implementations to
+ * The {@link MediaRequest} interface is threading-model-oblivious, allowing the implementations to
  * be processed synchronously or asynchronously.
  * This is a {@link MediaRequest} implementation that includes functionalities such as binding and
  * event callbacks for multi-threaded media request processing.
diff --git a/src/com/android/messaging/datamodel/media/MediaRequest.java b/src/com/android/messaging/datamodel/media/MediaRequest.java
index 703671b..78ae85e 100644
--- a/src/com/android/messaging/datamodel/media/MediaRequest.java
+++ b/src/com/android/messaging/datamodel/media/MediaRequest.java
@@ -21,7 +21,7 @@
  * Keeps track of a media loading request. MediaResourceManager uses this interface to load, encode,
  * decode, and cache different types of media resource.
  *
- * This interface defines a media request class that's threading-model-blind. Wrapper classes
+ * This interface defines a media request class that's threading-model-oblivious. Wrapper classes
  * (such as {@link AsyncMediaRequestWrapper} wraps around any base media request to offer async
  * extensions).
  */
@@ -67,4 +67,4 @@
      * Returns the descriptor defining the request.
      */
     MediaRequestDescriptor<T> getDescriptor();
-}
\ No newline at end of file
+}
diff --git a/src/com/android/messaging/mmslib/pdu/PduComposer.java b/src/com/android/messaging/mmslib/pdu/PduComposer.java
index f318382..ace49d1 100644
--- a/src/com/android/messaging/mmslib/pdu/PduComposer.java
+++ b/src/com/android/messaging/mmslib/pdu/PduComposer.java
@@ -1080,7 +1080,7 @@
             }
 
             if (dataLength != (attachment.getLength() - headerLength)) {
-                throw new RuntimeException("BUG: Length sanity check failed");
+                throw new RuntimeException("BUG: Length check failed");
             }
 
             mStack.pop();
diff --git a/src/com/android/messaging/mmslib/pdu/PduPersister.java b/src/com/android/messaging/mmslib/pdu/PduPersister.java
index 1139aa1..d1175ab 100644
--- a/src/com/android/messaging/mmslib/pdu/PduPersister.java
+++ b/src/com/android/messaging/mmslib/pdu/PduPersister.java
@@ -1440,7 +1440,7 @@
 
         // Save parts first to avoid inconsistent message is loaded
         // while saving the parts.
-        final long dummyId = System.currentTimeMillis(); // Dummy ID of the msg.
+        final long placeholderId = System.currentTimeMillis(); // Placeholder ID of the msg.
 
         // Figure out if this PDU is a text-only message
         boolean textOnly = true;
@@ -1463,7 +1463,7 @@
                 }
                 for (int i = 0; i < partsNum; i++) {
                     final PduPart part = body.getPart(i);
-                    persistPart(part, dummyId, preOpenedFiles);
+                    persistPart(part, placeholderId, preOpenedFiles);
 
                     // If we've got anything besides text/plain or SMIL part, then we've got
                     // an mms message with some other type of attachment.
@@ -1501,14 +1501,14 @@
                 throw new MmsException("persist() failed: return null.");
             }
             // Get the real ID of the PDU and update all parts which were
-            // saved with the dummy ID.
+            // saved with the placeholder ID.
             msgId = ContentUris.parseId(res);
         }
 
         values = new ContentValues(1);
         values.put(Part.MSG_ID, msgId);
         SqliteWrapper.update(mContext, mContentResolver,
-                Uri.parse("content://mms/" + dummyId + "/part"),
+                Uri.parse("content://mms/" + placeholderId + "/part"),
                 values, null, null);
         // We should return the longest URI of the persisted PDU, for
         // example, if input URI is "content://mms/inbox" and the _ID of
diff --git a/src/com/android/messaging/ui/appsettings/ApnEditorActivity.java b/src/com/android/messaging/ui/appsettings/ApnEditorActivity.java
index ae4b2eb..5d19a83 100644
--- a/src/com/android/messaging/ui/appsettings/ApnEditorActivity.java
+++ b/src/com/android/messaging/ui/appsettings/ApnEditorActivity.java
@@ -365,8 +365,8 @@
                 protected Void doInBackground(Void... params) {
                     ContentValues values = new ContentValues();
 
-                    // Add a dummy name "Untitled", if the user exits the screen without adding a
-                    // name but entered other information worth keeping.
+                    // Add a placeholder name "Untitled", if the user exits the screen without
+                    // adding a name but entered other information worth keeping.
                     values.put(Telephony.Carriers.NAME, name.length() < 1 ?
                             getResources().getString(R.string.untitled_apn) : name);
                     values.put(Telephony.Carriers.MMSPROXY, checkNotSet(mMmsProxy.getText()));
diff --git a/src/com/android/messaging/ui/appsettings/SettingsActivity.java b/src/com/android/messaging/ui/appsettings/SettingsActivity.java
index e8c05ec..dc16d0a 100644
--- a/src/com/android/messaging/ui/appsettings/SettingsActivity.java
+++ b/src/com/android/messaging/ui/appsettings/SettingsActivity.java
@@ -46,7 +46,7 @@
 import java.util.List;
 
 /**
- * Shows the "master" settings activity that contains two parts, one for application-wide settings
+ * Shows the "primary" settings activity that contains two parts, one for application-wide settings
  * (dubbed "General settings"), and one or more for per-subscription settings (dubbed "Messaging
  * settings" for single-SIM, and the actual SIM name for multi-SIM). Clicking on either item
  * (e.g. "General settings") will open the detail settings activity (ApplicationSettingsActivity
diff --git a/src/com/android/messaging/util/Trace.java b/src/com/android/messaging/util/Trace.java
index da1e87c..69910f7 100644
--- a/src/com/android/messaging/util/Trace.java
+++ b/src/com/android/messaging/util/Trace.java
@@ -101,7 +101,7 @@
     }
 
     /**
-     * Dummy class that we use if we aren't really tracing.
+     * Placeholder class that we use if we aren't really tracing.
      */
     private static final class TraceShim extends AbstractTrace {
         @Override
diff --git a/tests/src/com/android/messaging/datamodel/action/ActionServiceTest.java b/tests/src/com/android/messaging/datamodel/action/ActionServiceTest.java
index 5eb0f67..8daafb8 100644
--- a/tests/src/com/android/messaging/datamodel/action/ActionServiceTest.java
+++ b/tests/src/com/android/messaging/datamodel/action/ActionServiceTest.java
@@ -80,7 +80,7 @@
     }
 
     /**
-     * For a dummy action verify that the service intent is constructed and queued correctly and
+     * For a chat action verify that the service intent is constructed and queued correctly and
      * that when that intent is processed it actually executes the action.
      */
     public void testChatServiceCreatesIntentAndExecutesAction() {