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

Commit ba3306fc authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Adding null check for invalid recents task list. (Bug 17476926)" into lmp-dev

parents 625f0559 4298b435
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -179,6 +179,12 @@ public class SystemServicesProxy {
                ActivityManager.RECENT_IGNORE_UNAVAILABLE |
                ActivityManager.RECENT_INCLUDE_PROFILES |
                ActivityManager.RECENT_WITH_EXCLUDED, userId);

        // Break early if we can't get a valid set of tasks
        if (tasks == null) {
            return new ArrayList<ActivityManager.RecentTaskInfo>();
        }

        boolean isFirstValidTask = true;
        Iterator<ActivityManager.RecentTaskInfo> iter = tasks.iterator();
        while (iter.hasNext()) {