Force update orientation handler for initial recents view state.

Force execute updateSizeAndPadding at onGestureAnimationStart to ensure
there has computed the initial task size even if orientation didn't
changed.

Bug: 228565696
Test: run "atest NexusLauncherTests" on tablet device.
Change-Id: I175754a68e91039dffdfd4035414885417882a07
This commit is contained in:
wilsonshih
2022-04-08 21:10:53 +08:00
parent 1eb1140129
commit 671d44b36b
@@ -2092,6 +2092,9 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
if (mOrientationState.setGestureActive(true)) {
setLayoutRotation(rotationTouchHelper.getCurrentActiveRotation(),
rotationTouchHelper.getDisplayRotation());
// Force update to ensure the initial task size is computed even if the orientation has
// not changed.
updateSizeAndPadding();
}
showCurrentTask(runningTaskInfo);