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
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user