Only show running apps for the current user+profiles

The counting of the number of apps correctly filters out apps running in
other users, but when the information is fetched to show the UI the
filtering isn't applied.

Test: Manual
Fixes: 236614285
Change-Id: Ida07b03be89b58481ac8c531e536e963789f49b7
This commit is contained in:
Evan Severson
2022-06-22 14:50:38 -07:00
parent 25019b3782
commit f228f63d21

View File

@@ -322,7 +322,8 @@ class FgsManagerController @Inject constructor(
}
val addedPackages = runningServiceTokens.keys.filter {
it.uiControl != UIControl.HIDE_ENTRY && runningApps[it]?.stopped != true
currentProfileIds.contains(it.userId) &&
it.uiControl != UIControl.HIDE_ENTRY && runningApps[it]?.stopped != true
}
val removedPackages = runningApps.keys.filter { !runningServiceTokens.containsKey(it) }