Merge "Update language to comply with Android's inclusive language guidance"

This commit is contained in:
Jackal Guo
2020-08-17 01:08:02 +00:00
committed by Gerrit Code Review
3 changed files with 15 additions and 15 deletions

View File

@@ -56,19 +56,19 @@ public final class IntentFilterVerificationInfo implements Parcelable {
private ArraySet<String> mDomains = new ArraySet<>();
private String mPackageName;
private int mMainStatus;
private int mStatus;
/** @hide */
public IntentFilterVerificationInfo() {
mPackageName = null;
mMainStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED;
mStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED;
}
/** @hide */
public IntentFilterVerificationInfo(String packageName, ArraySet<String> domains) {
mPackageName = packageName;
mDomains = domains;
mMainStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED;
mStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED;
}
/** @hide */
@@ -87,14 +87,14 @@ public final class IntentFilterVerificationInfo implements Parcelable {
}
public int getStatus() {
return mMainStatus;
return mStatus;
}
/** @hide */
public void setStatus(int s) {
if (s >= INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED &&
s <= INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER) {
mMainStatus = s;
mStatus = s;
} else {
Log.w(TAG, "Trying to set a non supported status: " + s);
}
@@ -156,7 +156,7 @@ public final class IntentFilterVerificationInfo implements Parcelable {
if (status == -1) {
Log.e(TAG, "Unknown status value: " + status);
}
mMainStatus = status;
mStatus = status;
int outerDepth = parser.getDepth();
int type;
@@ -184,7 +184,7 @@ public final class IntentFilterVerificationInfo implements Parcelable {
/** @hide */
public void writeToXml(XmlSerializer serializer) throws IOException {
serializer.attribute(null, ATTR_PACKAGE_NAME, mPackageName);
serializer.attribute(null, ATTR_STATUS, String.valueOf(mMainStatus));
serializer.attribute(null, ATTR_STATUS, String.valueOf(mStatus));
for (String str : mDomains) {
serializer.startTag(null, TAG_DOMAIN);
serializer.attribute(null, ATTR_DOMAIN_NAME, str);
@@ -194,7 +194,7 @@ public final class IntentFilterVerificationInfo implements Parcelable {
/** @hide */
public String getStatusString() {
return getStatusStringFromValue(((long)mMainStatus) << 32);
return getStatusStringFromValue(((long) mStatus) << 32);
}
/** @hide */
@@ -233,7 +233,7 @@ public final class IntentFilterVerificationInfo implements Parcelable {
private void readFromParcel(Parcel source) {
mPackageName = source.readString();
mMainStatus = source.readInt();
mStatus = source.readInt();
ArrayList<String> list = new ArrayList<>();
source.readStringList(list);
mDomains.addAll(list);
@@ -242,7 +242,7 @@ public final class IntentFilterVerificationInfo implements Parcelable {
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(mPackageName);
dest.writeInt(mMainStatus);
dest.writeInt(mStatus);
dest.writeStringList(new ArrayList<>(mDomains));
}

View File

@@ -7776,7 +7776,7 @@ public class PackageManagerService extends IPackageManager.Stub
// low 'int'-sized word: relative priority among 'always' results.
private long getDomainVerificationStatusLPr(PackageSetting ps, int userId) {
long result = ps.getDomainVerificationStatusForUser(userId);
// if none available, get the master status
// if none available, get the status
if (result >> 32 == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED) {
if (ps.getIntentFilterVerificationInfo() != null) {
result = ((long)ps.getIntentFilterVerificationInfo().getStatus()) << 32;
@@ -16772,7 +16772,7 @@ public class PackageManagerService extends IPackageManager.Stub
if (DEBUG_INSTALL) Slog.d(TAG, "installPackageLI: path=" + tmpPackageFile);
// Sanity check
// Validity check
if (instantApp && onExternal) {
Slog.i(TAG, "Incompatible ephemeral install; external=" + onExternal);
throw new PrepareFailure(PackageManager.INSTALL_FAILED_INSTANT_APP_INVALID);
@@ -16972,7 +16972,7 @@ public class PackageManagerService extends IPackageManager.Stub
}
}
// Quick sanity check that we're signed correctly if updating;
// Quick validity check that we're signed correctly if updating;
// we'll check this again later when scanning, but we want to
// bail early here before tripping over redefined permissions.
final KeySetManagerService ksms = mSettings.mKeySetManagerService;
@@ -21091,7 +21091,7 @@ public class PackageManagerService extends IPackageManager.Stub
// had been set as a preferred activity. We try to clean this up
// the next time we encounter that preferred activity, but it is
// possible for the user flow to never be able to return to that
// situation so here we do a sanity check to make sure we haven't
// situation so here we do a validity check to make sure we haven't
// left any junk around.
ArrayList<PreferredActivity> removed = new ArrayList<>();
for (int i=0; i<mSettings.mPreferredActivities.size(); i++) {

View File

@@ -2981,7 +2981,7 @@ class PackageManagerShellCommand extends ShellCommand {
session = new PackageInstaller.Session(
mInterface.getPackageInstaller().openSession(sessionId));
if (!session.isMultiPackage() && !session.isStaged()) {
// Sanity check that all .dm files match an apk.
// Validity check that all .dm files match an apk.
// (The installer does not support standalone .dm files and will not process them.)
try {
DexMetadataHelper.validateDexPaths(session.getNames());