Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +6 −0 Original line number Diff line number Diff line Loading @@ -4974,6 +4974,12 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump return false; } if (DeviceEntryUdfpsRefactor.isEnabled() && mAlternateBouncerInteractor.isVisibleState()) { // never send touches to shade if the alternate bouncer is showing return false; } if (event.getAction() == MotionEvent.ACTION_DOWN) { if (event.getDownTime() == mLastTouchDownTime) { // An issue can occur when swiping down after unlock, where multiple down Loading packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -897,8 +897,8 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mConfigurationController.onConfigurationChanged(configuration); } protected void onTouchEvent(MotionEvent ev) { mTouchHandler.onTouch(mView, ev); protected boolean onTouchEvent(MotionEvent ev) { return mTouchHandler.onTouch(mView, ev); } protected void setDozing(boolean dozing, boolean dozingAlwaysOn) { Loading packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +18 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,24 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo assertThat(mNotificationPanelViewController.isTracking()).isFalse(); } @Test public void alternateBouncerVisible_onTouchEvent_notHandled() { mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); // GIVEN alternate bouncer is visible when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(true); // WHEN touch DOWN event received; THEN touch is NOT handled assertThat(onTouchEvent(MotionEvent.obtain(0L /* downTime */, 0L /* eventTime */, MotionEvent.ACTION_DOWN, 0f /* x */, 0f /* y */, 0 /* metaState */))).isFalse(); // WHEN touch MOVE event received; THEN touch is NOT handled assertThat(onTouchEvent(MotionEvent.obtain(0L /* downTime */, 0L /* eventTime */, MotionEvent.ACTION_MOVE, 0f /* x */, 200f /* y */, 0 /* metaState */))).isFalse(); } @Test public void test_onTouchEvent_startTracking() { // GIVEN device is NOT pulsing Loading Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +6 −0 Original line number Diff line number Diff line Loading @@ -4974,6 +4974,12 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump return false; } if (DeviceEntryUdfpsRefactor.isEnabled() && mAlternateBouncerInteractor.isVisibleState()) { // never send touches to shade if the alternate bouncer is showing return false; } if (event.getAction() == MotionEvent.ACTION_DOWN) { if (event.getDownTime() == mLastTouchDownTime) { // An issue can occur when swiping down after unlock, where multiple down Loading
packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -897,8 +897,8 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mConfigurationController.onConfigurationChanged(configuration); } protected void onTouchEvent(MotionEvent ev) { mTouchHandler.onTouch(mView, ev); protected boolean onTouchEvent(MotionEvent ev) { return mTouchHandler.onTouch(mView, ev); } protected void setDozing(boolean dozing, boolean dozingAlwaysOn) { Loading
packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +18 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,24 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo assertThat(mNotificationPanelViewController.isTracking()).isFalse(); } @Test public void alternateBouncerVisible_onTouchEvent_notHandled() { mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); // GIVEN alternate bouncer is visible when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(true); // WHEN touch DOWN event received; THEN touch is NOT handled assertThat(onTouchEvent(MotionEvent.obtain(0L /* downTime */, 0L /* eventTime */, MotionEvent.ACTION_DOWN, 0f /* x */, 0f /* y */, 0 /* metaState */))).isFalse(); // WHEN touch MOVE event received; THEN touch is NOT handled assertThat(onTouchEvent(MotionEvent.obtain(0L /* downTime */, 0L /* eventTime */, MotionEvent.ACTION_MOVE, 0f /* x */, 200f /* y */, 0 /* metaState */))).isFalse(); } @Test public void test_onTouchEvent_startTracking() { // GIVEN device is NOT pulsing Loading