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
Loading
Please register or sign in to comment