diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 45822b1a39..83569f54db 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -757,6 +757,7 @@ public abstract class RecentsView< /** * Placeholder view indicating where the first split screen selected app will be placed */ + @Nullable protected SplitSelectStateController mSplitSelectStateController; /** @@ -1220,7 +1221,8 @@ public abstract class RecentsView< } public boolean isSplitSelectionActive() { - return mSplitSelectStateController.isSplitSelectActive(); + return mSplitSelectStateController != null + && mSplitSelectStateController.isSplitSelectActive(); } /** @@ -4145,12 +4147,14 @@ public abstract class RecentsView< mTopRowIdSet.remove(dismissedTaskViewId); if (taskCount == 1) { - removeViewInLayout(mClearAllButton); - removeViewInLayout(mAddDesktopButton); - if (isHomeTaskDismissed) { - updateEmptyMessage(); - } else if (!mSplitSelectStateController.isSplitSelectActive()) { - startHome(); + if (!isSplitSelectionActive()) { + removeViewInLayout(mClearAllButton); + removeViewInLayout(mAddDesktopButton); + if (isHomeTaskDismissed) { + updateEmptyMessage(); + } else { + startHome(); + } } } else { // Update focus task and its size. @@ -4800,7 +4804,7 @@ public abstract class RecentsView< } public void updateEmptyMessage() { - boolean isEmpty = !hasTaskViews(); + boolean isEmpty = !hasTaskViews() && !isSplitSelectionActive(); boolean hasSizeChanged = mLastMeasureSize.x != getWidth() || mLastMeasureSize.y != getHeight(); if (isEmpty == mShowEmptyMessage && !hasSizeChanged) {