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

Commit a2aa3ead authored by Winson's avatar Winson
Browse files

Null check inside filterIfNotSystemUser

List<ResolveInfo> is defined as nullable, so if that ever happens,
need to handle it in the filter method.

Bug: 222180729

Test: presubmit

Change-Id: I84e8b66485f226e0d01074e01c77fa0b71f37122
parent 1c11a5df
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1431,7 +1431,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);