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

Commit a079771a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Early exit when target app ID < FIRST_APP_UID" into rvc-dev am: d65f6e8f am: 39b17aa8

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

Change-Id: I8fd9bc9601423fe5b60dd1b9b1e44dbad9096998
parents 26735977 39b17aa8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -861,6 +861,7 @@ public class AppsFilter {
        try {
            int callingAppId = UserHandle.getAppId(callingUid);
            if (callingAppId < Process.FIRST_APPLICATION_UID
                    || targetPkgSetting.appId < Process.FIRST_APPLICATION_UID
                    || callingAppId == targetPkgSetting.appId) {
                return false;
            }
+2 −1
Original line number Diff line number Diff line
@@ -806,7 +806,8 @@ public class AppsFilterTest {

        final SparseArray<int[]> systemFilter =
                appsFilter.getVisibilityWhitelist(system, USER_ARRAY, mExisting);
        assertThat(toList(systemFilter.get(SYSTEM_USER)), empty());
        assertThat(toList(systemFilter.get(SYSTEM_USER)),
                contains(seesNothingAppId, hasProviderAppId, queriesProviderAppId));

        final SparseArray<int[]> seesNothingFilter =
                appsFilter.getVisibilityWhitelist(seesNothing, USER_ARRAY, mExisting);