summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/recents
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2014-09-14 07:12:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-14 07:12:40 +0000
commitba3306fc47b08b28b0a6201e04cb5fbc7808d80d (patch)
tree8ee91e816598d9cb1f15caa86bf4adf2faee9320 /packages/SystemUI/src/com/android/systemui/recents
parent625f05595877309288c298e59ae86c14423d283e (diff)
parent4298b43592966b9b620866bb3da1ab3f9ed2e668 (diff)
downloadframeworks_base-ba3306fc47b08b28b0a6201e04cb5fbc7808d80d.zip
frameworks_base-ba3306fc47b08b28b0a6201e04cb5fbc7808d80d.tar.gz
frameworks_base-ba3306fc47b08b28b0a6201e04cb5fbc7808d80d.tar.bz2
Merge "Adding null check for invalid recents task list. (Bug 17476926)" into lmp-dev
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java6
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()) {