commit | da849daa55d1deea35b7193bc23d5a32578fc9a8 | [log] [tgz] |
---|---|---|
author | Dave Mankoff <mankoff@google.com> | Wed Jan 04 18:21:05 2023 +0000 |
committer | Dave Mankoff <mankoff@google.com> | Wed Jan 04 21:07:06 2023 +0000 |
tree | e5903e731d38f92c0b6c8b6e8ae1a9534a0fb90c | |
parent | df30e8a45b6974bc9e2eae372bec42bf83054ffa [diff] |
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
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/TypeClassifier.java b/packages/SystemUI/src/com/android/systemui/classifier/TypeClassifier.java index f576a5a..d8d2c98 100644 --- a/packages/SystemUI/src/com/android/systemui/classifier/TypeClassifier.java +++ b/packages/SystemUI/src/com/android/systemui/classifier/TypeClassifier.java
@@ -69,6 +69,8 @@ // 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;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java index c2c38a7..5891948 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
@@ -1902,8 +1902,10 @@ } if (ev.getActionMasked() == MotionEvent.ACTION_UP) { // Ensure the falsing manager records the touch. we don't do anything with it - // at the moment. - mFalsingManager.isFalseTouch(Classifier.SHADE_DRAG); + // 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);