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
This commit is contained in:
Raman Tenneti
2020-07-29 16:43:46 -07:00
parent b1aa213ce9
commit 4b52654e98
12 changed files with 27 additions and 24 deletions
@@ -49,10 +49,13 @@ public class DatabaseHelper extends SQLiteOpenHelper {
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 @@ public class DatabaseHelper extends SQLiteOpenHelper {
*/
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 @@ public class DatabaseHelper extends SQLiteOpenHelper {
*/
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 class DatabaseHelper extends SQLiteOpenHelper {
*/
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 @@ public class DatabaseHelper extends SQLiteOpenHelper {
*/
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 ";
@@ -780,8 +780,8 @@ public class ConversationData extends BindableData {
}
/**
* 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 {
@@ -19,7 +19,7 @@ import com.android.messaging.datamodel.binding.BindableOnceData;
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.
@@ -21,7 +21,7 @@ import java.util.List;
* 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 @@ public interface MediaRequest<T extends RefCountedMediaResource> {
* Returns the descriptor defining the request.
*/
MediaRequestDescriptor<T> getDescriptor();
}
}
@@ -1080,7 +1080,7 @@ public class PduComposer {
}
if (dataLength != (attachment.getLength() - headerLength)) {
throw new RuntimeException("BUG: Length sanity check failed");
throw new RuntimeException("BUG: Length check failed");
}
mStack.pop();
@@ -1440,7 +1440,7 @@ public class PduPersister {
// 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 @@ public class PduPersister {
}
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 @@ public class PduPersister {
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
@@ -365,8 +365,8 @@ public class ApnEditorActivity extends BugleActionBarActivity {
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()));
@@ -46,7 +46,7 @@ import java.util.ArrayList;
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
+1 -1
View File
@@ -101,7 +101,7 @@ public final class Trace {
}
/**
* 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