Update surface position while there is no surface animation playing
Previous logic uses getAnimationType to know if there will be a surface
update caused by the insets animation. However, if the animation is
played by the InsetsAnimationThreadControlRunner, the animation will be
finished first, and then the runner will post a message to the main UI
thread to remove the animation from mRunningAnimations. That would
produce a time that a control is not being animated, but
InsetsSourceConsumer still thinks it is being animated and skips
updating the surface position.
This CL creates a thread-safe method:
InsetsAnimationControlRunner#willUpdateSurface
which returns false if a runner is finished or cancelled, and
InsetsSourceConsumer can update the surface based on it.
Fix: 379967370
Fix: 394229693
Flag: EXEMPT bugfix
Test: Show gesture navigation bar from immersive mode and change the
screen orientation from landscape to portrait. Make sure the
navigation bar position is correct.
Change-Id: I1d84511082a50a56cda6ca060620b53a3261430f
Loading
Please register or sign in to comment