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 e3fb16afe4591..ca0f357ff46ce 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 tasks = getRunningTasks(1); - if (!tasks.isEmpty()) { + if (tasks != null && !tasks.isEmpty()) { return tasks.get(0); } return null;