Merge "Avoid removing ClearAllButton in split select animation" into main
This commit is contained in:
commit
191dda179e
1 file changed
+12
-8
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user