diff options
| author | 2023-05-19 09:36:45 +0000 | |
|---|---|---|
| committer | 2023-05-19 09:45:33 +0000 | |
| commit | fd77f12147baa1086bfc244cca3cfca704130c17 (patch) | |
| tree | 282198e278384f24574aaf2ae37658ef018a6e7d /libs/androidfw/FileStream.cpp | |
| parent | fd9d67ef3ef65c8914545c9ae3008718bdb7bd68 (diff) | |
Only do snapback animations on Swipeable views
SwipeHelper is observing all the children of the notification shade, it
is translating them on swipes and performs dismiss or snapback
animations on them.
NotificationSwipeHelper overrides a couple of methods to make them only
work for views implementing the SwipeableView interface.
The SwipeHelper#snapChild method is triggered for non swipeable views as
well, and it starts an animation for them, but previously we never
noticed, because the `setTranslation` method is overriden, so views
never had a starting translation to snap back from.
Updating the snapback anim to a spring animation (ag/22119722) caused a
regression, because the spring anim can do an overshoot from the target
position if it was given some starting velocity.
This is a trivial fix to skip triggering the snapback anim for non
swipeable views.
Fixes: 278858192
Test: atest NotificationSwipeHelperTest
Test: try to drag the non swipeable views in the NotificationShade and
observe that they stay in place
Change-Id: I5afb7bb94c052faf0025abe15f586937733c5fa4
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions