Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java +1 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,7 @@ public class QuickStepController implements GestureHelper { // Requires proxy and an active gesture or able to perform any gesture to continue if (mOverviewEventSender.getProxy() == null || !mOverviewEventSender.shouldShowSwipeUpUI() || (mCurrentAction == null && !canPerformAnyAction())) { return deadZoneConsumed; } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/QuickStepControllerTest.java +13 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ public class QuickStepControllerTest extends SysuiTestCase { mProxyService = mock(OverviewProxyService.class); mProxy = mock(IOverviewProxy.Stub.class); doReturn(mProxy).when(mProxyService).getProxy(); doReturn(true).when(mProxyService).shouldShowSwipeUpUI(); mDependency.injectTestDependency(OverviewProxyService.class, mProxyService); mStatusBar = mock(StatusBar.class); Loading Loading @@ -105,6 +106,18 @@ public class QuickStepControllerTest extends SysuiTestCase { assertNull(mController.getCurrentAction()); } @Test public void testNoGesturesWhenSwipeUpDisabled() throws Exception { doReturn(false).when(mProxyService).shouldShowSwipeUpUI(); mController.setGestureActions(mockAction(true), null /* swipeDownAction */, null /* swipeLeftAction */, null /* swipeRightAction */); MotionEvent ev = event(MotionEvent.ACTION_DOWN, 1, 1); assertFalse(mController.onInterceptTouchEvent(ev)); verify(mNavigationBarView, never()).requestUnbufferedDispatch(ev); assertNull(mController.getCurrentAction()); } @Test public void testHasActionDetectGesturesTouchdown() throws Exception { MotionEvent ev = event(MotionEvent.ACTION_DOWN, 1, 1); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java +1 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,7 @@ public class QuickStepController implements GestureHelper { // Requires proxy and an active gesture or able to perform any gesture to continue if (mOverviewEventSender.getProxy() == null || !mOverviewEventSender.shouldShowSwipeUpUI() || (mCurrentAction == null && !canPerformAnyAction())) { return deadZoneConsumed; } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/QuickStepControllerTest.java +13 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ public class QuickStepControllerTest extends SysuiTestCase { mProxyService = mock(OverviewProxyService.class); mProxy = mock(IOverviewProxy.Stub.class); doReturn(mProxy).when(mProxyService).getProxy(); doReturn(true).when(mProxyService).shouldShowSwipeUpUI(); mDependency.injectTestDependency(OverviewProxyService.class, mProxyService); mStatusBar = mock(StatusBar.class); Loading Loading @@ -105,6 +106,18 @@ public class QuickStepControllerTest extends SysuiTestCase { assertNull(mController.getCurrentAction()); } @Test public void testNoGesturesWhenSwipeUpDisabled() throws Exception { doReturn(false).when(mProxyService).shouldShowSwipeUpUI(); mController.setGestureActions(mockAction(true), null /* swipeDownAction */, null /* swipeLeftAction */, null /* swipeRightAction */); MotionEvent ev = event(MotionEvent.ACTION_DOWN, 1, 1); assertFalse(mController.onInterceptTouchEvent(ev)); verify(mNavigationBarView, never()).requestUnbufferedDispatch(ev); assertNull(mController.getCurrentAction()); } @Test public void testHasActionDetectGesturesTouchdown() throws Exception { MotionEvent ev = event(MotionEvent.ACTION_DOWN, 1, 1); Loading