Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +22 −9 Original line number Diff line number Diff line Loading @@ -1831,8 +1831,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } private ExpandableView getChildAtPosition(float touchX, float touchY) { return getChildAtPosition( touchX, touchY, true /* requireMinHeight */, true /* ignoreDecors */); return getChildAtPosition(touchX, touchY, true /* requireMinHeight */, true /* ignoreDecors */, true /* ignoreWidth */); } /** Loading @@ -1842,10 +1842,11 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable * @param touchY the y coordinate * @param requireMinHeight Whether a minimum height is required for a child to be returned. * @param ignoreDecors Whether decors can be returned * @param ignoreWidth Whether we should ignore the width of the child * @return the child at the given location. */ ExpandableView getChildAtPosition(float touchX, float touchY, boolean requireMinHeight, boolean ignoreDecors) { ExpandableView getChildAtPosition(float touchX, float touchY, boolean requireMinHeight, boolean ignoreDecors, boolean ignoreWidth) { // find the view under the pointer, accounting for GONE views final int count = getChildCount(); for (int childIdx = 0; childIdx < count; childIdx++) { Loading @@ -1861,8 +1862,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable // Allow the full width of this view to prevent gesture conflict on Keyguard (phone and // camera affordance). int left = 0; int right = getWidth(); int left = ignoreWidth ? 0 : slidingChild.getLeft(); int right = ignoreWidth ? getWidth() : slidingChild.getRight(); if ((bottom - top >= mMinInteractionHeight || !requireMinHeight) && touchY >= top && touchY <= bottom && touchX >= left && touchX <= right) { Loading Loading @@ -3585,9 +3586,20 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable public boolean onTouchEvent(MotionEvent ev) { if (mTouchHandler != null) { boolean touchHandled = mTouchHandler.onTouchEvent(ev); if (SceneContainerFlag.isEnabled() || touchHandled) { if (SceneContainerFlag.isEnabled()) { if (getChildAtPosition( mInitialTouchX, mInitialTouchY, true, true, false) == null) { // If scene container is enabled, any touch that we are handling that is not on // a child view should be handled by scene container instead. return false; } else { // If scene container is enabled, any touch that we are handling that is not on // a child view should be handled by scene container instead. return touchHandled; } } else if (touchHandled) { return true; } } return super.onTouchEvent(ev); Loading Loading @@ -4027,7 +4039,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable final int y = (int) ev.getY(); mScrolledToTopOnFirstDown = mScrollAdapter.isScrolledToTop(); final ExpandableView childAtTouchPos = getChildAtPosition( ev.getX(), y, false /* requireMinHeight */, false /* ignoreDecors */); ev.getX(), y, false /* requireMinHeight */, false /* ignoreDecors */, true /* ignoreWidth */); if (childAtTouchPos == null) { setIsBeingDragged(false); recycleVelocityTracker(); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +2 −1 Original line number Diff line number Diff line Loading @@ -596,7 +596,8 @@ public class NotificationStackScrollLayoutController implements Dumpable { ev.getX(), ev.getY(), true /* requireMinHeight */, false /* ignoreDecors */); false /* ignoreDecors */, true /* ignoreWidth */); if (child instanceof ExpandableNotificationRow row) { ExpandableNotificationRow parent = row.getNotificationParent(); if (parent != null && parent.areChildrenExpanded() Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +22 −9 Original line number Diff line number Diff line Loading @@ -1831,8 +1831,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } private ExpandableView getChildAtPosition(float touchX, float touchY) { return getChildAtPosition( touchX, touchY, true /* requireMinHeight */, true /* ignoreDecors */); return getChildAtPosition(touchX, touchY, true /* requireMinHeight */, true /* ignoreDecors */, true /* ignoreWidth */); } /** Loading @@ -1842,10 +1842,11 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable * @param touchY the y coordinate * @param requireMinHeight Whether a minimum height is required for a child to be returned. * @param ignoreDecors Whether decors can be returned * @param ignoreWidth Whether we should ignore the width of the child * @return the child at the given location. */ ExpandableView getChildAtPosition(float touchX, float touchY, boolean requireMinHeight, boolean ignoreDecors) { ExpandableView getChildAtPosition(float touchX, float touchY, boolean requireMinHeight, boolean ignoreDecors, boolean ignoreWidth) { // find the view under the pointer, accounting for GONE views final int count = getChildCount(); for (int childIdx = 0; childIdx < count; childIdx++) { Loading @@ -1861,8 +1862,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable // Allow the full width of this view to prevent gesture conflict on Keyguard (phone and // camera affordance). int left = 0; int right = getWidth(); int left = ignoreWidth ? 0 : slidingChild.getLeft(); int right = ignoreWidth ? getWidth() : slidingChild.getRight(); if ((bottom - top >= mMinInteractionHeight || !requireMinHeight) && touchY >= top && touchY <= bottom && touchX >= left && touchX <= right) { Loading Loading @@ -3585,9 +3586,20 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable public boolean onTouchEvent(MotionEvent ev) { if (mTouchHandler != null) { boolean touchHandled = mTouchHandler.onTouchEvent(ev); if (SceneContainerFlag.isEnabled() || touchHandled) { if (SceneContainerFlag.isEnabled()) { if (getChildAtPosition( mInitialTouchX, mInitialTouchY, true, true, false) == null) { // If scene container is enabled, any touch that we are handling that is not on // a child view should be handled by scene container instead. return false; } else { // If scene container is enabled, any touch that we are handling that is not on // a child view should be handled by scene container instead. return touchHandled; } } else if (touchHandled) { return true; } } return super.onTouchEvent(ev); Loading Loading @@ -4027,7 +4039,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable final int y = (int) ev.getY(); mScrolledToTopOnFirstDown = mScrollAdapter.isScrolledToTop(); final ExpandableView childAtTouchPos = getChildAtPosition( ev.getX(), y, false /* requireMinHeight */, false /* ignoreDecors */); ev.getX(), y, false /* requireMinHeight */, false /* ignoreDecors */, true /* ignoreWidth */); if (childAtTouchPos == null) { setIsBeingDragged(false); recycleVelocityTracker(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +2 −1 Original line number Diff line number Diff line Loading @@ -596,7 +596,8 @@ public class NotificationStackScrollLayoutController implements Dumpable { ev.getX(), ev.getY(), true /* requireMinHeight */, false /* ignoreDecors */); false /* ignoreDecors */, true /* ignoreWidth */); if (child instanceof ExpandableNotificationRow row) { ExpandableNotificationRow parent = row.getNotificationParent(); if (parent != null && parent.areChildrenExpanded() Loading