diff options
| author | 2015-05-27 12:45:20 -0700 | |
|---|---|---|
| committer | 2015-05-27 19:47:21 +0000 | |
| commit | 65c294036bd3a01af0755519d37ef7e9f64b9fb9 (patch) | |
| tree | 42dc5a10b69b60a1129f65cf2b490bcf2fa5d189 | |
| parent | 8141d6e1509a586e2954fbece04e64aaa02092a2 (diff) | |
Adding NPE check when the system has no tasks.
Bug: 20640135
Change-Id: Ifb62d18dbf2125bc33325b7c2f2a44da51309325
| -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 e3fb16afe459..ca0f357ff46c 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; |