Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 514f6576 authored by Tiger's avatar Tiger Committed by Tiger Huang
Browse files

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
parent ee908655
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment