diff options
author | Winson Chung <winsonc@google.com> | 2014-09-12 15:25:46 +0200 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2014-09-12 15:25:46 +0200 |
commit | 4298b43592966b9b620866bb3da1ab3f9ed2e668 (patch) | |
tree | 03f88fbc758b1691cdd7930458a5b6c2a002d714 /packages/SystemUI/src/com/android/systemui/recents | |
parent | d4aaab99bb13c7f34df480bb170f2afc71849f3f (diff) | |
download | frameworks_base-4298b43592966b9b620866bb3da1ab3f9ed2e668.zip frameworks_base-4298b43592966b9b620866bb3da1ab3f9ed2e668.tar.gz frameworks_base-4298b43592966b9b620866bb3da1ab3f9ed2e668.tar.bz2 |
Adding null check for invalid recents task list. (Bug 17476926)
Change-Id: Ie12b70282bf35de5c33634012e2b2e0a9e0c6af0
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents')
-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()) { |