Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java +11 −12 Original line number Diff line number Diff line Loading @@ -952,11 +952,10 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { @Test @EnableSceneContainer public void onTouchEvent_stopExpandingNotification_sceneContainerEnabled() { boolean touchHandled = stopExpandingNotification(); stopExpandingNotification(); verify(mNotificationStackScrollLayout).startOverscrollAfterExpanding(); verify(mExpandHelper).finishExpanding(); verify(mNotificationStackScrollLayout, never()).dispatchDownEventToScroller(any()); assertTrue(touchHandled); } @Test Loading @@ -964,11 +963,11 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { public void onTouchEvent_stopExpandingNotification_sceneContainerDisabled() { stopExpandingNotification(); verify(mNotificationStackScrollLayout, never()).startOverscrollAfterExpanding(); verify(mExpandHelper, never()).finishExpanding(); verify(mNotificationStackScrollLayout).dispatchDownEventToScroller(any()); } private boolean stopExpandingNotification() { private void stopExpandingNotification() { when(mNotificationStackScrollLayout.getExpandHelper()).thenReturn(mExpandHelper); when(mNotificationStackScrollLayout.getIsExpanded()).thenReturn(true); when(mNotificationStackScrollLayout.getExpandedInThisMotion()).thenReturn(true); Loading @@ -983,7 +982,7 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { NotificationStackScrollLayoutController.TouchHandler touchHandler = mController.getTouchHandler(); return touchHandler.onTouchEvent(MotionEvent.obtain( touchHandler.onTouchEvent(MotionEvent.obtain( /* downTime= */ 0, /* eventTime= */ 0, MotionEvent.ACTION_DOWN, Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +0 −8 Original line number Diff line number Diff line Loading @@ -3727,14 +3727,6 @@ public class NotificationStackScrollLayout downEvent.recycle(); } // Only when scene container is enabled, mark that we are being dragged so that we start // dispatching the rest of the gesture to scene container. void startOverscrollAfterExpanding() { if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return; getExpandHelper().finishExpanding(); setIsBeingDragged(true); } // Only when scene container is enabled, mark that we are being dragged so that we start // dispatching the rest of the gesture to scene container. void startDraggingOnHun() { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +3 −4 Original line number Diff line number Diff line Loading @@ -2203,11 +2203,10 @@ public class NotificationStackScrollLayoutController implements Dumpable { expandingNotification = mView.isExpandingNotification(); if (mView.getExpandedInThisMotion() && !expandingNotification && wasExpandingBefore && !mView.getDisallowScrollingInThisMotion()) { // We need to dispatch the overscroll differently when Scene Container is on, // since NSSL no longer controls its own scroll. // Finish expansion here, as this gesture will be marked to be sent to // scene container if (SceneContainerFlag.isEnabled() && !isCancelOrUp) { mView.startOverscrollAfterExpanding(); return true; expandHelper.finishExpanding(); } else { mView.dispatchDownEventToScroller(ev); } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java +0 −8 Original line number Diff line number Diff line Loading @@ -1544,14 +1544,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { assertFalse(mStackScroller.mHeadsUpAnimatingAway); } @Test @EnableSceneContainer public void finishExpanding_sceneContainerEnabled() { mStackScroller.startOverscrollAfterExpanding(); verify(mStackScroller.getExpandHelper()).finishExpanding(); assertTrue(mStackScroller.getIsBeingDragged()); } private MotionEvent captureTouchSentToSceneFramework() { ArgumentCaptor<MotionEvent> captor = ArgumentCaptor.forClass(MotionEvent.class); verify(mStackScrollLayoutController).sendTouchToSceneFramework(captor.capture()); Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java +11 −12 Original line number Diff line number Diff line Loading @@ -952,11 +952,10 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { @Test @EnableSceneContainer public void onTouchEvent_stopExpandingNotification_sceneContainerEnabled() { boolean touchHandled = stopExpandingNotification(); stopExpandingNotification(); verify(mNotificationStackScrollLayout).startOverscrollAfterExpanding(); verify(mExpandHelper).finishExpanding(); verify(mNotificationStackScrollLayout, never()).dispatchDownEventToScroller(any()); assertTrue(touchHandled); } @Test Loading @@ -964,11 +963,11 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { public void onTouchEvent_stopExpandingNotification_sceneContainerDisabled() { stopExpandingNotification(); verify(mNotificationStackScrollLayout, never()).startOverscrollAfterExpanding(); verify(mExpandHelper, never()).finishExpanding(); verify(mNotificationStackScrollLayout).dispatchDownEventToScroller(any()); } private boolean stopExpandingNotification() { private void stopExpandingNotification() { when(mNotificationStackScrollLayout.getExpandHelper()).thenReturn(mExpandHelper); when(mNotificationStackScrollLayout.getIsExpanded()).thenReturn(true); when(mNotificationStackScrollLayout.getExpandedInThisMotion()).thenReturn(true); Loading @@ -983,7 +982,7 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { NotificationStackScrollLayoutController.TouchHandler touchHandler = mController.getTouchHandler(); return touchHandler.onTouchEvent(MotionEvent.obtain( touchHandler.onTouchEvent(MotionEvent.obtain( /* downTime= */ 0, /* eventTime= */ 0, MotionEvent.ACTION_DOWN, Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +0 −8 Original line number Diff line number Diff line Loading @@ -3727,14 +3727,6 @@ public class NotificationStackScrollLayout downEvent.recycle(); } // Only when scene container is enabled, mark that we are being dragged so that we start // dispatching the rest of the gesture to scene container. void startOverscrollAfterExpanding() { if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return; getExpandHelper().finishExpanding(); setIsBeingDragged(true); } // Only when scene container is enabled, mark that we are being dragged so that we start // dispatching the rest of the gesture to scene container. void startDraggingOnHun() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +3 −4 Original line number Diff line number Diff line Loading @@ -2203,11 +2203,10 @@ public class NotificationStackScrollLayoutController implements Dumpable { expandingNotification = mView.isExpandingNotification(); if (mView.getExpandedInThisMotion() && !expandingNotification && wasExpandingBefore && !mView.getDisallowScrollingInThisMotion()) { // We need to dispatch the overscroll differently when Scene Container is on, // since NSSL no longer controls its own scroll. // Finish expansion here, as this gesture will be marked to be sent to // scene container if (SceneContainerFlag.isEnabled() && !isCancelOrUp) { mView.startOverscrollAfterExpanding(); return true; expandHelper.finishExpanding(); } else { mView.dispatchDownEventToScroller(ev); } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java +0 −8 Original line number Diff line number Diff line Loading @@ -1544,14 +1544,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { assertFalse(mStackScroller.mHeadsUpAnimatingAway); } @Test @EnableSceneContainer public void finishExpanding_sceneContainerEnabled() { mStackScroller.startOverscrollAfterExpanding(); verify(mStackScroller.getExpandHelper()).finishExpanding(); assertTrue(mStackScroller.getIsBeingDragged()); } private MotionEvent captureTouchSentToSceneFramework() { ArgumentCaptor<MotionEvent> captor = ArgumentCaptor.forClass(MotionEvent.class); verify(mStackScrollLayoutController).sendTouchToSceneFramework(captor.capture()); Loading