From 98127fb818778b26127a1d52db8ef0ccff200470 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Mon, 23 Mar 2015 15:12:53 -0700 Subject: Adding null check for focused stack before trying to switch affiliated tasks. Bug: 19870065 Change-Id: I674914b9d4a63cb9c73fa71bbc4b82c210e2001f --- packages/SystemUI/src/com/android/systemui/recents/Recents.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/Recents.java b/packages/SystemUI/src/com/android/systemui/recents/Recents.java index 9dd82fc8024a..a510b6f4f5d8 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/Recents.java +++ b/packages/SystemUI/src/com/android/systemui/recents/Recents.java @@ -377,7 +377,7 @@ public class Recents extends SystemUI } // Return early if there are no tasks in the focused stack - if (focusedStack.getTaskCount() == 0) return; + if (focusedStack == null || focusedStack.getTaskCount() == 0) return; ActivityManager.RunningTaskInfo runningTask = mSystemServicesProxy.getTopMostTask(); // Return early if there is no running task (can't determine affiliated tasks in this case) -- cgit v1.2.3-59-g8ed1b