Avoid unnecessary onLayout if gesture is going to state without overview panel
Fixes: 186508379
Test: swipe up to carousel, then to home
Test: quick switch, immediately swipe up to overview, then to home
Change-Id: I0b28e163cbb289a636a89bc52c43a1977a59d86f
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index abeadfd..dc7347e 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -3314,9 +3314,9 @@
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- // If we're going to HOME, avoid unnecessary onLayout that cause TaskViews to re-arrange
- // during animation to HOME.
- if (mCurrentGestureEndTarget == GestureState.GestureEndTarget.HOME) {
+ // If we're going to a state without overview panel, avoid unnecessary onLayout that
+ // cause TaskViews to re-arrange during animation to that state.
+ if (!mOverviewStateEnabled && !mFirstLayout) {
return;
}