diff options
author | Tyler Gunn <tgunn@google.com> | 2020-07-29 10:21:45 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2020-07-29 10:23:07 -0700 |
commit | 460360d6b8c03de927e719abadfad2e6ee8e3099 (patch) | |
tree | 085826c7c53f9df4d6d429e2bbc141c2b72f5e8c /telephony/common | |
parent | cbb4cd1f8ce791d3ab30d8cbdfa385608160f230 (diff) |
Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference
Test: Presubmit
Bug: 161896447
Change-Id: I4142f4819f5ed3e2ffddf471b90923985e72523a
Diffstat (limited to 'telephony/common')
4 files changed, 17 insertions, 15 deletions
diff --git a/telephony/common/android/telephony/LocationAccessPolicy.java b/telephony/common/android/telephony/LocationAccessPolicy.java index b1dc1da76272..892e55942d3f 100644 --- a/telephony/common/android/telephony/LocationAccessPolicy.java +++ b/telephony/common/android/telephony/LocationAccessPolicy.java @@ -51,7 +51,7 @@ public final class LocationAccessPolicy { ALLOWED, /** * Indicates that the denial is due to a transient device state - * (e.g. app-ops, location master switch) + * (e.g. app-ops, location main switch) */ DENIED_SOFT, /** @@ -259,7 +259,7 @@ public final class LocationAccessPolicy { return LocationPermissionResult.ALLOWED; } - // Check the system-wide requirements. If the location master switch is off or + // Check the system-wide requirements. If the location main switch is off or // the app's profile isn't in foreground, return a soft denial. if (!checkSystemLocationAccess(context, query.callingUid, query.callingPid)) { return LocationPermissionResult.DENIED_SOFT; @@ -283,7 +283,7 @@ public final class LocationAccessPolicy { } // At this point, we're out of location checks to do. If the app bypassed all the previous - // ones due to the SDK grandfathering schemes, allow it access. + // ones due to the SDK backwards compatibility schemes, allow it access. return LocationPermissionResult.ALLOWED; } diff --git a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java index fff6696604dc..fdbbaee64979 100644 --- a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java +++ b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java @@ -75,7 +75,8 @@ public final class TelephonyPermissions { * <li>return false: if the caller lacks all of these permissions and doesn't support runtime * permissions. This implies that the user revoked the ability to read phone state * manually (via AppOps). In this case we can't throw as it would break app compatibility, - * so we return false to indicate that the calling function should return dummy data. + * so we return false to indicate that the calling function should return placeholder + * data. * </ul> * * <p>Note: for simplicity, this method always returns false for callers using legacy @@ -120,7 +121,8 @@ public final class TelephonyPermissions { * <li>return false: if the caller lacks all of these permissions and doesn't support runtime * permissions. This implies that the user revoked the ability to read phone state * manually (via AppOps). In this case we can't throw as it would break app compatibility, - * so we return false to indicate that the calling function should return dummy data. + * so we return false to indicate that the calling function should return placeholder + * data. * </ul> * * <p>Note: for simplicity, this method always returns false for callers using legacy @@ -226,7 +228,7 @@ public final class TelephonyPermissions { * <li>return false: if the caller is targeting pre-Q and does have the READ_PHONE_STATE * permission. In this case the caller would expect to have access to the device * identifiers so false is returned instead of throwing a SecurityException to indicate - * the calling function should return dummy data. + * the calling function should return placeholder data. * </ul> */ public static boolean checkCallingOrSelfReadDeviceIdentifiers(Context context, @@ -250,7 +252,7 @@ public final class TelephonyPermissions { * <li>return false: if the caller is targeting pre-Q and does have the READ_PHONE_STATE * permission or carrier privileges. In this case the caller would expect to have access * to the device identifiers so false is returned instead of throwing a SecurityException - * to indicate the calling function should return dummy data. + * to indicate the calling function should return placeholder data. * </ul> */ public static boolean checkCallingOrSelfReadDeviceIdentifiers(Context context, int subId, @@ -272,7 +274,7 @@ public final class TelephonyPermissions { * <li>return false: if the caller is targeting pre-Q and does have the READ_PHONE_STATE * permission. In this case the caller would expect to have access to the device * identifiers so false is returned instead of throwing a SecurityException to indicate - * the calling function should return dummy data. + * the calling function should return placeholder data. * </ul> */ public static boolean checkCallingOrSelfReadSubscriberIdentifiers(Context context, int subId, @@ -296,7 +298,7 @@ public final class TelephonyPermissions { * <li>return false: if the caller is targeting pre-Q and does have the READ_PHONE_STATE * permission. In this case the caller would expect to have access to the device * identifiers so false is returned instead of throwing a SecurityException to indicate - * the calling function should return dummy data. + * the calling function should return placeholder data. * </ul> */ private static boolean checkPrivilegedReadPermissionOrCarrierPrivilegePermission( diff --git a/telephony/common/com/google/android/mms/pdu/PduComposer.java b/telephony/common/com/google/android/mms/pdu/PduComposer.java index 5e1f556f4c4a..7af0d1b09eed 100644 --- a/telephony/common/com/google/android/mms/pdu/PduComposer.java +++ b/telephony/common/com/google/android/mms/pdu/PduComposer.java @@ -1051,7 +1051,7 @@ public class PduComposer { } if (dataLength != (attachment.getLength() - headerLength)) { - throw new RuntimeException("BUG: Length sanity check failed"); + throw new RuntimeException("BUG: Length correctness check failed"); } mStack.pop(); diff --git a/telephony/common/com/google/android/mms/pdu/PduPersister.java b/telephony/common/com/google/android/mms/pdu/PduPersister.java index fcd5b8ff57a8..b61ad3680c6c 100755 --- a/telephony/common/com/google/android/mms/pdu/PduPersister.java +++ b/telephony/common/com/google/android/mms/pdu/PduPersister.java @@ -72,7 +72,7 @@ public class PduPersister { private static final boolean DEBUG = false; private static final boolean LOCAL_LOGV = false; - private static final long DUMMY_THREAD_ID = Long.MAX_VALUE; + private static final long PLACEHOLDER_THREAD_ID = Long.MAX_VALUE; /** * The uri of temporary drm objects. @@ -1340,7 +1340,7 @@ public class PduPersister { // Save parts first to avoid inconsistent message is loaded // while saving the parts. - long dummyId = System.currentTimeMillis(); // Dummy ID of the msg. + long placeholderId = System.currentTimeMillis(); // Placeholder ID of the msg. // Figure out if this PDU is a text-only message boolean textOnly = true; @@ -1364,7 +1364,7 @@ public class PduPersister { for (int i = 0; i < partsNum; i++) { PduPart part = body.getPart(i); messageSize += part.getDataLength(); - 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. @@ -1395,14 +1395,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 |