Only play insets resize animation when needed
There are two cases that we might mistrigger the insets resize animation which would cause the window to delay updating the insets until the animation finishes: 1. The insets source itself won't animate when resizing. For example, status bar might resize itself when the state of containing the display cutout is changed. Status bar will resize to the target size in just one frame, so we shouldn't trigger the fake insets resize animation (duration: 300 ms) and report the fake progress to the app. 2. When the insets source is invisible at the server side. InsetsSourceProvider would reset the source frame when mServerVisible is false. Although the insets source frame size is changed, but there is no resize animation in this case. This CL introduces an InsetsSource flag, FLAG_ANIMATE_RESIZING. Only the source window which plays resize animation should apply it. Bug: 291562764 Test: atest InsetsControllerTest Test: Fold and unfold a foldable device and see if there is an InsetsResizeAnimationRunner. Merged-In: I484d9da89ca8e21578f2005d6409c4e8a919ae37 Change-Id: I484d9da89ca8e21578f2005d6409c4e8a919ae37
Loading
Please register or sign in to comment