packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelper.java
+5
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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