Avoid unnecessary onLayout if gesture is going to HOME

Fixes: 186508379
Test: manual swipe up to carousel, then to home
Change-Id: I97a642a6fc4c4d0ca3805b79db60b6dfdaea1315
This commit is contained in:
Alex Chau
2021-06-09 13:07:32 +01:00
parent bf9b2ca0bd
commit 6f736fac65

View File

@@ -2781,6 +2781,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
@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);