Avoid unnecessary onLayout if gesture is going to state without overview panel am: 96ffcbcd2d

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15667340

Change-Id: I8f5406cdb37c12759b2f3ef5870e804b8e9677e5
This commit is contained in:
Alex Chau
2021-08-24 16:22:26 +00:00
committed by Automerger Merge Worker
@@ -3314,9 +3314,9 @@ 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) {
// 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;
}