diff options
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java index bbd0a0d..11b7b8b 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java @@ -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()) { |