Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da849daa authored by Dave Mankoff's avatar Dave Mankoff
Browse files

Fix falsing on notification dismissal.

We were incorrectly analyzing shade swipes during notification
dismissal. When an owner swipes side-to-side, we shouldn't try
to classify it as a shade_drag, which is intended for vertical
drags.

I also found an bad switch-case fall-through in TypeClassifier
related to the BRIGHTNESS_SLIDER that is fixed.

Test: manually swiped on notifications.
Bug: 236197248
Change-Id: Ib040530775a42cb21326f4a74e693565707c1b6f
parent df30e8a4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@ public class TypeClassifier extends FalsingClassifier {
                // A more sophisticated thing to do here would be to look at the size of the
                // vertical change relative to the screen size. _Some_ amount of vertical
                // change should be expected.
                wrongDirection = vertical;
                break;
            case NOTIFICATION_DISMISS:
                wrongDirection = vertical;
                break;
+4 −2
Original line number Diff line number Diff line
@@ -1902,8 +1902,10 @@ public class NotificationStackScrollLayoutController {
            }
            if (ev.getActionMasked() == MotionEvent.ACTION_UP) {
                // Ensure the falsing manager records the touch. we don't do anything with it
                // at the moment.
                // at the moment, but it may trigger a global falsing event.
                if (!horizontalSwipeWantsIt) {
                    mFalsingManager.isFalseTouch(Classifier.SHADE_DRAG);
                }
                mView.setCheckForLeaveBehind(true);
            }
            traceJankOnTouchEvent(ev.getActionMasked(), scrollerWantsIt);