diff options
author | Winson Chung <winsonc@google.com> | 2015-05-27 12:45:20 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2015-05-27 19:47:21 +0000 |
commit | 65c294036bd3a01af0755519d37ef7e9f64b9fb9 (patch) | |
tree | 42dc5a10b69b60a1129f65cf2b490bcf2fa5d189 /packages | |
parent | 8141d6e1509a586e2954fbece04e64aaa02092a2 (diff) | |
download | frameworks_base-65c294036bd3a01af0755519d37ef7e9f64b9fb9.zip frameworks_base-65c294036bd3a01af0755519d37ef7e9f64b9fb9.tar.gz frameworks_base-65c294036bd3a01af0755519d37ef7e9f64b9fb9.tar.bz2 |
Adding NPE check when the system has no tasks.
Bug: 20640135
Change-Id: Ifb62d18dbf2125bc33325b7c2f2a44da51309325
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java | 2 |
1 files changed, 1 insertions, 1 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 e3fb16a..ca0f357 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java @@ -227,7 +227,7 @@ public class SystemServicesProxy { /** Returns the top task. */ public ActivityManager.RunningTaskInfo getTopMostTask() { List<ActivityManager.RunningTaskInfo> tasks = getRunningTasks(1); - if (!tasks.isEmpty()) { + if (tasks != null && !tasks.isEmpty()) { return tasks.get(0); } return null; |