diff options
author | Winson Chung <winsonc@google.com> | 2015-05-27 21:27:20 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-27 21:27:23 +0000 |
commit | f89655239836f0aaca76044a51e8569ed91c660c (patch) | |
tree | 3a6f8bc80af0a3edfd96be0e22605dc049ec7774 /packages | |
parent | e3230ae223165948434370fd28e1e7a517ae6272 (diff) | |
parent | 65c294036bd3a01af0755519d37ef7e9f64b9fb9 (diff) | |
download | frameworks_base-f89655239836f0aaca76044a51e8569ed91c660c.zip frameworks_base-f89655239836f0aaca76044a51e8569ed91c660c.tar.gz frameworks_base-f89655239836f0aaca76044a51e8569ed91c660c.tar.bz2 |
Merge "Adding NPE check when the system has no tasks." into mnc-dev
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; |