Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationSwipeActionHelper.java +2 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ public interface NotificationSwipeActionHelper { public boolean isDismissGesture(MotionEvent ev); public boolean isFalseGesture(MotionEvent ev); public boolean swipedFarEnough(float translation, float viewSize); public boolean swipedFastEnough(float translation, float velocity); Loading packages/SystemUI/src/com/android/systemui/SwipeHelper.java +7 −3 Original line number Diff line number Diff line Loading @@ -653,15 +653,19 @@ public class SwipeHelper implements Gefingerpoken { } public boolean isDismissGesture(MotionEvent ev) { return ev.getActionMasked() == MotionEvent.ACTION_UP && !isFalseGesture(ev) && (swipedFastEnough() || swipedFarEnough()) && mCallback.canChildBeDismissed(mCurrView); } public boolean isFalseGesture(MotionEvent ev) { boolean falsingDetected = mCallback.isAntiFalsingNeeded(); if (mFalsingManager.isClassiferEnabled()) { falsingDetected = falsingDetected && mFalsingManager.isFalseTouch(); } else { falsingDetected = falsingDetected && !mTouchAboveFalsingThreshold; } return !falsingDetected && (swipedFastEnough() || swipedFarEnough()) && ev.getActionMasked() == MotionEvent.ACTION_UP && mCallback.canChildBeDismissed(mCurrView); return falsingDetected; } protected boolean swipedFastEnough() { Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java +2 −1 Original line number Diff line number Diff line Loading @@ -337,7 +337,8 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl } else { snapBack(animView, velocity); } } else if ((swipedEnoughToShowMenu() && (!gestureFastEnough || showMenuForSlowOnGoing)) } else if (!mSwipeHelper.isFalseGesture(ev) && (swipedEnoughToShowMenu() && (!gestureFastEnough || showMenuForSlowOnGoing)) || (gestureTowardsMenu && !mSwipeHelper.isDismissGesture(ev))) { // Menu has not been snapped to previously and this is menu revealing gesture showMenu(animView, menuSnapTarget, velocity); Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +4 −0 Original line number Diff line number Diff line Loading @@ -4353,6 +4353,10 @@ public class NotificationStackScrollLayout extends ViewGroup mStatusBar.setNotificationSnoozed(sbn, snoozeOption); } public boolean isFalseGesture(MotionEvent ev) { return super.isFalseGesture(ev); } private void handleMenuCoveredOrDismissed() { if (mMenuExposedView != null && mMenuExposedView == mTranslatingParentView) { mMenuExposedView = null; Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationSwipeActionHelper.java +2 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ public interface NotificationSwipeActionHelper { public boolean isDismissGesture(MotionEvent ev); public boolean isFalseGesture(MotionEvent ev); public boolean swipedFarEnough(float translation, float viewSize); public boolean swipedFastEnough(float translation, float velocity); Loading
packages/SystemUI/src/com/android/systemui/SwipeHelper.java +7 −3 Original line number Diff line number Diff line Loading @@ -653,15 +653,19 @@ public class SwipeHelper implements Gefingerpoken { } public boolean isDismissGesture(MotionEvent ev) { return ev.getActionMasked() == MotionEvent.ACTION_UP && !isFalseGesture(ev) && (swipedFastEnough() || swipedFarEnough()) && mCallback.canChildBeDismissed(mCurrView); } public boolean isFalseGesture(MotionEvent ev) { boolean falsingDetected = mCallback.isAntiFalsingNeeded(); if (mFalsingManager.isClassiferEnabled()) { falsingDetected = falsingDetected && mFalsingManager.isFalseTouch(); } else { falsingDetected = falsingDetected && !mTouchAboveFalsingThreshold; } return !falsingDetected && (swipedFastEnough() || swipedFarEnough()) && ev.getActionMasked() == MotionEvent.ACTION_UP && mCallback.canChildBeDismissed(mCurrView); return falsingDetected; } protected boolean swipedFastEnough() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java +2 −1 Original line number Diff line number Diff line Loading @@ -337,7 +337,8 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl } else { snapBack(animView, velocity); } } else if ((swipedEnoughToShowMenu() && (!gestureFastEnough || showMenuForSlowOnGoing)) } else if (!mSwipeHelper.isFalseGesture(ev) && (swipedEnoughToShowMenu() && (!gestureFastEnough || showMenuForSlowOnGoing)) || (gestureTowardsMenu && !mSwipeHelper.isDismissGesture(ev))) { // Menu has not been snapped to previously and this is menu revealing gesture showMenu(animView, menuSnapTarget, velocity); Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +4 −0 Original line number Diff line number Diff line Loading @@ -4353,6 +4353,10 @@ public class NotificationStackScrollLayout extends ViewGroup mStatusBar.setNotificationSnoozed(sbn, snoozeOption); } public boolean isFalseGesture(MotionEvent ev) { return super.isFalseGesture(ev); } private void handleMenuCoveredOrDismissed() { if (mMenuExposedView != null && mMenuExposedView == mTranslatingParentView) { mMenuExposedView = null; Loading