Merge "Null check inside filterIfNotSystemUser" into tm-dev

This commit is contained in:
Winson Chiu
2022-03-22 13:58:59 +00:00
committed by Android (Google) Code Review

View File

@@ -1429,7 +1429,8 @@ public class ComputerEngine implements Computer {
if (userId == UserHandle.USER_SYSTEM) {
return resolveInfos;
}
for (int i = resolveInfos.size() - 1; i >= 0; i--) {
for (int i = CollectionUtils.size(resolveInfos) - 1; i >= 0; i--) {
ResolveInfo info = resolveInfos.get(i);
if ((info.activityInfo.flags & ActivityInfo.FLAG_SYSTEM_USER_ONLY) != 0) {
resolveInfos.remove(i);