summaryrefslogtreecommitdiff
path: root/libs/input/SpriteController.cpp
diff options
context:
space:
mode:
author Candice <chihtinglo@google.com> 2024-04-08 05:58:55 +0000
committer Candice <chihtinglo@google.com> 2024-04-12 08:03:01 +0000
commitef8900043cce7cb07218915d7694f4a8e4f9ef3e (patch)
treeab226975307c969141ba58e513ef7519268de619 /libs/input/SpriteController.cpp
parentf1f87d882ecffa05a9ad5bc0a297c11e6fa58eab (diff)
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
Diffstat (limited to 'libs/input/SpriteController.cpp')
0 files changed, 0 insertions, 0 deletions