Merge "Avoid unnecessary onLayout if gesture is going to HOME" into sc-v2-dev am: 2f05076711 am: bfb180064b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14919071
Change-Id: I588e65b8e5fe6d1d85b4a0550914a27c6bb4c8a9
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index c57d156..2cfaa4d 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -2781,6 +2781,12 @@
@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) {
+ return;
+ }
+
super.onLayout(changed, left, top, right, bottom);
updateEmptyStateUi(changed);