Pause expensive view updates before setting hw/sw layers.

Prevents widgets from updating mid animation.
Also pauses view updates during app close animation.

Bug: 220939231
Bug: 230617085
Bug: 226171754
Test: manual

Change-Id: I0138d57e6a7b2c22fd9a029e971b3e27c7e9f22e
This commit is contained in:
Jon Miranda
2022-06-02 11:34:15 -07:00
parent c2c1fdad54
commit 46ecc0ca08
4 changed files with 27 additions and 6 deletions

View File

@@ -483,6 +483,9 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
? new float[]{1, mContentScale}
: new float[]{mContentScale, 1};
// Pause expensive view updates as they can lead to layer thrashing and skipped frames.
mLauncher.pauseExpensiveViewUpdates();
if (mLauncher.isInState(ALL_APPS)) {
// All Apps in portrait mode is full screen, so we only animate AllAppsContainerView.
final View appsView = mLauncher.getAppsView();
@@ -581,9 +584,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
}
}
// Pause expensive view updates as they can lead to layer thrashing and skipped frames.
mLauncher.pauseExpensiveViewUpdates();
endListener = () -> {
viewsToAnimate.forEach(view -> {
SCALE_PROPERTY.set(view, 1f);