Loading packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java +5 −2 Original line number Diff line number Diff line Loading @@ -155,9 +155,12 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler { return true; } // Don't set expansion if the user doesn't have a pin/password set. // Don't set expansion if the user doesn't have a pin/password set so that no // animations are played we're not transitioning to the bouncer. if (!mLockPatternUtils.isSecure(mUserTracker.getUserId())) { return true; // Return false so the gesture is not consumed, allowing the dream to wake // if it wants instead of doing nothing. return false; } // For consistency, we adopt the expansion definition found in the Loading packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java +5 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.systemui.dreams.touch; import static com.google.common.truth.Truth.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyFloat; import static org.mockito.ArgumentMatchers.eq; Loading Loading @@ -295,7 +294,8 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase { } /** * Makes sure the expansion amount is proportional to (1 - scroll). * Verifies that swiping up when the lock pattern is not secure does not consume the scroll * gesture or expand. */ @Test public void testSwipeUp_keyguardNotSecure_doesNotExpand() { Loading @@ -314,8 +314,10 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase { 0, SCREEN_HEIGHT_PX - distanceY, 0); reset(mScrimController); // Scroll gesture is not consumed. assertThat(gestureListener.onScroll(event1, event2, 0, distanceY)) .isTrue(); .isFalse(); // We should not expand since the keyguard is not secure verify(mScrimController, never()).expand(any()); } Loading Loading
packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java +5 −2 Original line number Diff line number Diff line Loading @@ -155,9 +155,12 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler { return true; } // Don't set expansion if the user doesn't have a pin/password set. // Don't set expansion if the user doesn't have a pin/password set so that no // animations are played we're not transitioning to the bouncer. if (!mLockPatternUtils.isSecure(mUserTracker.getUserId())) { return true; // Return false so the gesture is not consumed, allowing the dream to wake // if it wants instead of doing nothing. return false; } // For consistency, we adopt the expansion definition found in the Loading
packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java +5 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.systemui.dreams.touch; import static com.google.common.truth.Truth.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyFloat; import static org.mockito.ArgumentMatchers.eq; Loading Loading @@ -295,7 +294,8 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase { } /** * Makes sure the expansion amount is proportional to (1 - scroll). * Verifies that swiping up when the lock pattern is not secure does not consume the scroll * gesture or expand. */ @Test public void testSwipeUp_keyguardNotSecure_doesNotExpand() { Loading @@ -314,8 +314,10 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase { 0, SCREEN_HEIGHT_PX - distanceY, 0); reset(mScrimController); // Scroll gesture is not consumed. assertThat(gestureListener.onScroll(event1, event2, 0, distanceY)) .isTrue(); .isFalse(); // We should not expand since the keyguard is not secure verify(mScrimController, never()).expand(any()); } Loading