Clear mTouchedView when a snap-back animation ends

Bug: 259529672
Test: dumpsysui SwipeHelper
Change-Id: Iff38e3721a4abfa613974e6df32cb178c3a73fb9
This commit is contained in:
Jeff DeCew
2023-05-26 13:37:05 -04:00
parent af1f8eeafa
commit a3dbe509c1

View File

@@ -548,6 +548,10 @@ public class SwipeHelper implements Gefingerpoken, Dumpable {
if (!cancelled) {
updateSwipeProgressFromOffset(animView, canBeDismissed);
resetSwipeOfView(animView);
// Clear the snapped view after success, assuming it's not being swiped now
if (animView == mTouchedView && !mIsSwiping) {
mTouchedView = null;
}
}
onChildSnappedBack(animView, targetLeft);
});