From 62d72f2e75b733675e9c68b9e734c53522740706 Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Mon, 23 Nov 2020 22:19:17 -0600 Subject: [PATCH] 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 --- packages/SystemUI/src/com/android/systemui/SwipeHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java index 6151ac7a242ba..3852b24fe4b37 100644 --- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java +++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java @@ -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); }