Fix race condition that skips corner updates on half swipe
Set mIsSwiping true before calling SwipeHelper#Callback#onBeginDrag; otherwise onBeginDrag may use an outdated false and mistakenly include the swiped view as part of a rounded section. Fixes: 173753021 Bug: 171817112 Test: half swipe first and last notifs in section; corners always update Change-Id: I115d30b10657b6edbf94d4d444058bdeeaf9000e
This commit is contained in:
@@ -327,8 +327,8 @@ public class SwipeHelper implements Gefingerpoken {
|
||||
if (Math.abs(delta) > pagingTouchSlop
|
||||
&& Math.abs(delta) > Math.abs(deltaPerpendicular)) {
|
||||
if (mCallback.canChildBeDragged(mTouchedView)) {
|
||||
mCallback.onBeginDrag(mTouchedView);
|
||||
mIsSwiping = true;
|
||||
mCallback.onBeginDrag(mTouchedView);
|
||||
mInitialTouchPos = getPos(ev);
|
||||
mTranslation = getTranslation(mTouchedView);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user