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

Commit 8132b223 authored by Patrick Baumann's avatar Patrick Baumann
Browse files

Remove incorrect optimization in visibility cache

During review when introducing the visibility cache, a suggested
optimization when iterating over users turned out to prevent populating
of the cache for certain multi-user cases.

This change ensures that we pass over all users in both directions,
making for a complete cache.

Test: atest AppEnumerationTests AppsFilterTest
Fixes: 159193336
Change-Id: Ic9ae27f1e1402b42a60a333c3ae99373f4829101
parent 606981a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -655,7 +655,7 @@ public class AppsFilter {
            final int appxUidCount = userCount * allSettings.size();
            for (int su = 0; su < userCount; su++) {
                int subjectUser = allUsers[su].id;
                for (int ou = su; ou < userCount; ou++) {
                for (int ou = 0; ou < userCount; ou++) {
                    int otherUser = allUsers[ou].id;
                    int subjectUid = UserHandle.getUid(subjectUser, subjectSetting.appId);
                    if (!mShouldFilterCache.contains(subjectUid)) {