Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6564bee authored by Jackal Guo's avatar Jackal Guo Committed by Automerger Merge Worker
Browse files

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

Merge "Update language to comply with Android's inclusive language guidance" am: 0090d82f am: c3972b8d am: 460fc577

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1398286

Change-Id: Ia18cae33d2efc71f61c1a2a37b25a1fb2147ccfb
parents 6e7c7f5c 460fc577
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -56,19 +56,19 @@ public final class IntentFilterVerificationInfo implements Parcelable {


    private ArraySet<String> mDomains = new ArraySet<>();
    private ArraySet<String> mDomains = new ArraySet<>();
    private String mPackageName;
    private String mPackageName;
    private int mMainStatus;
    private int mStatus;


    /** @hide */
    /** @hide */
    public IntentFilterVerificationInfo() {
    public IntentFilterVerificationInfo() {
        mPackageName = null;
        mPackageName = null;
        mMainStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED;
        mStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED;
    }
    }


    /** @hide */
    /** @hide */
    public IntentFilterVerificationInfo(String packageName, ArraySet<String> domains) {
    public IntentFilterVerificationInfo(String packageName, ArraySet<String> domains) {
        mPackageName = packageName;
        mPackageName = packageName;
        mDomains = domains;
        mDomains = domains;
        mMainStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED;
        mStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED;
    }
    }


    /** @hide */
    /** @hide */
@@ -87,14 +87,14 @@ public final class IntentFilterVerificationInfo implements Parcelable {
    }
    }


    public int getStatus() {
    public int getStatus() {
        return mMainStatus;
        return mStatus;
    }
    }


    /** @hide */
    /** @hide */
    public void setStatus(int s) {
    public void setStatus(int s) {
        if (s >= INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED &&
        if (s >= INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED &&
                s <= INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER) {
                s <= INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER) {
            mMainStatus = s;
            mStatus = s;
        } else {
        } else {
            Log.w(TAG, "Trying to set a non supported status: " + s);
            Log.w(TAG, "Trying to set a non supported status: " + s);
        }
        }
@@ -156,7 +156,7 @@ public final class IntentFilterVerificationInfo implements Parcelable {
        if (status == -1) {
        if (status == -1) {
            Log.e(TAG, "Unknown status value: " + status);
            Log.e(TAG, "Unknown status value: " + status);
        }
        }
        mMainStatus = status;
        mStatus = status;


        int outerDepth = parser.getDepth();
        int outerDepth = parser.getDepth();
        int type;
        int type;
@@ -184,7 +184,7 @@ public final class IntentFilterVerificationInfo implements Parcelable {
    /** @hide */
    /** @hide */
    public void writeToXml(XmlSerializer serializer) throws IOException {
    public void writeToXml(XmlSerializer serializer) throws IOException {
        serializer.attribute(null, ATTR_PACKAGE_NAME, mPackageName);
        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) {
        for (String str : mDomains) {
            serializer.startTag(null, TAG_DOMAIN);
            serializer.startTag(null, TAG_DOMAIN);
            serializer.attribute(null, ATTR_DOMAIN_NAME, str);
            serializer.attribute(null, ATTR_DOMAIN_NAME, str);
@@ -194,7 +194,7 @@ public final class IntentFilterVerificationInfo implements Parcelable {


    /** @hide */
    /** @hide */
    public String getStatusString() {
    public String getStatusString() {
        return getStatusStringFromValue(((long)mMainStatus) << 32);
        return getStatusStringFromValue(((long) mStatus) << 32);
    }
    }


    /** @hide */
    /** @hide */
@@ -233,7 +233,7 @@ public final class IntentFilterVerificationInfo implements Parcelable {


    private void readFromParcel(Parcel source) {
    private void readFromParcel(Parcel source) {
        mPackageName = source.readString();
        mPackageName = source.readString();
        mMainStatus = source.readInt();
        mStatus = source.readInt();
        ArrayList<String> list = new ArrayList<>();
        ArrayList<String> list = new ArrayList<>();
        source.readStringList(list);
        source.readStringList(list);
        mDomains.addAll(list);
        mDomains.addAll(list);
@@ -242,7 +242,7 @@ public final class IntentFilterVerificationInfo implements Parcelable {
    @Override
    @Override
    public void writeToParcel(Parcel dest, int flags) {
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(mPackageName);
        dest.writeString(mPackageName);
        dest.writeInt(mMainStatus);
        dest.writeInt(mStatus);
        dest.writeStringList(new ArrayList<>(mDomains));
        dest.writeStringList(new ArrayList<>(mDomains));
    }
    }


+4 −4
Original line number Original line Diff line number Diff line
@@ -7804,7 +7804,7 @@ public class PackageManagerService extends IPackageManager.Stub
    // low 'int'-sized word: relative priority among 'always' results.
    // low 'int'-sized word: relative priority among 'always' results.
    private long getDomainVerificationStatusLPr(PackageSetting ps, int userId) {
    private long getDomainVerificationStatusLPr(PackageSetting ps, int userId) {
        long result = ps.getDomainVerificationStatusForUser(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 (result >> 32 == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED) {
            if (ps.getIntentFilterVerificationInfo() != null) {
            if (ps.getIntentFilterVerificationInfo() != null) {
                result = ((long)ps.getIntentFilterVerificationInfo().getStatus()) << 32;
                result = ((long)ps.getIntentFilterVerificationInfo().getStatus()) << 32;
@@ -17190,7 +17190,7 @@ public class PackageManagerService extends IPackageManager.Stub
        if (DEBUG_INSTALL) Slog.d(TAG, "installPackageLI: path=" + tmpPackageFile);
        if (DEBUG_INSTALL) Slog.d(TAG, "installPackageLI: path=" + tmpPackageFile);
        // Sanity check
        // Validity check
        if (instantApp && onExternal) {
        if (instantApp && onExternal) {
            Slog.i(TAG, "Incompatible ephemeral install; external=" + onExternal);
            Slog.i(TAG, "Incompatible ephemeral install; external=" + onExternal);
            throw new PrepareFailure(PackageManager.INSTALL_FAILED_INSTANT_APP_INVALID);
            throw new PrepareFailure(PackageManager.INSTALL_FAILED_INSTANT_APP_INVALID);
@@ -17334,7 +17334,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
                // we'll check this again later when scanning, but we want to
                // bail early here before tripping over redefined permissions.
                // bail early here before tripping over redefined permissions.
                final KeySetManagerService ksms = mSettings.mKeySetManagerService;
                final KeySetManagerService ksms = mSettings.mKeySetManagerService;
@@ -21439,7 +21439,7 @@ public class PackageManagerService extends IPackageManager.Stub
            // had been set as a preferred activity.  We try to clean this up
            // had been set as a preferred activity.  We try to clean this up
            // the next time we encounter that preferred activity, but it is
            // the next time we encounter that preferred activity, but it is
            // possible for the user flow to never be able to return to that
            // 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.
            // left any junk around.
            ArrayList<PreferredActivity> removed = new ArrayList<>();
            ArrayList<PreferredActivity> removed = new ArrayList<>();
            for (int i=0; i<mSettings.mPreferredActivities.size(); i++) {
            for (int i=0; i<mSettings.mPreferredActivities.size(); i++) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -3336,7 +3336,7 @@ class PackageManagerShellCommand extends ShellCommand {
            session = new PackageInstaller.Session(
            session = new PackageInstaller.Session(
                    mInterface.getPackageInstaller().openSession(sessionId));
                    mInterface.getPackageInstaller().openSession(sessionId));
            if (!session.isMultiPackage() && !session.isStaged()) {
            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.)
                // (The installer does not support standalone .dm files and will not process them.)
                try {
                try {
                    DexMetadataHelper.validateDexPaths(session.getNames());
                    DexMetadataHelper.validateDexPaths(session.getNames());