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

Skip to content
Commit ef890004 authored by Candice's avatar Candice
Browse files

fix(window magnification): call notifySourceBoundsChanged when the animation ends

In original design, we only call onSourceBoundsChanged after setting
geometry with the check of `calculateSourceBounds` returning
true(getting new source bounds) and animation is not animating. However,
since onAnimationUpdate will be called on animation 100%
(`calculateSourceBounds`=true, isAnimating=true) and the calling
`enableWindowMagnificationInternal` in onAnimationEnd has the same
source bounds as in animation 100% (`calculateSourceBounds`=false,
isAnimating=false), onSourceBoundsChanged never get called.
Therefore, we do the following change:
1. Create a new method `notifySourceBoundsChanged` for the
   process(sending onSourceBoundsChanged callback) we would like
   to go through when the source bounds change is finalized.
2. onSourceBoundsChanged is only called in following two cases: (1)
   In onAnimationEnd if the animation is applied to the window magnifier
   (2) After setGeometry if no animation is running.

Bug: 332010994
Test: atest AccessibilityMagnificationTest
      atest WindowMagnificationControllerTest
      atest WindowMagnificationControllerWindowlessMagnifierTest
      atest WindowMagnificationAnimationController
Flag: ACONFIG com.android.systemui.create_windowless_window_magnifier DEVELOPMENT
Change-Id: Icbb3d19c2db02050da071fbccf79dd0e65eda1a9
parent f1f87d88
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