summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Austin Delgado <austindelgado@google.com> 2023-04-28 15:32:17 -0700
committer Austin Delgado <austindelgado@google.com> 2023-04-28 15:40:35 -0700
commitbee032078368fc2edd9c7cccf8b09b90493e714c (patch)
treee826757f2eeedec3b26a45c65870514224fb78d1
parent2f63277b7fd951e79c06ba5edd34bf2db693015a (diff)
Fix touches passing though Notification Bar drag down
Fixes touches being processed while a swipe to bring down notifications or swipe to bring up bouncer is in process. Bug: 279873052 Test: atest SystemUITests:com.android.systemui.biometrics Change-Id: I4a7c97db483acf4443474428055bdcaa43ffcb59
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java9
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java8
2 files changed, 11 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
index 7a237591a212..5ee38c3c9d8f 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
@@ -553,6 +553,10 @@ public class UdfpsController implements DozeReceiver, Dumpable {
+ mOverlay.getRequestId());
return false;
}
+ if (mLockscreenShadeTransitionController.getQSDragProgress() != 0f
+ || mPrimaryBouncerInteractor.isInTransit()) {
+ return false;
+ }
final TouchProcessorResult result = mTouchProcessor.processTouch(event, mActivePointerId,
mOverlayParams);
@@ -626,9 +630,8 @@ public class UdfpsController implements DozeReceiver, Dumpable {
shouldPilfer = true;
}
- // Execute the pilfer, never pilfer if a vertical swipe is in progress
- if (shouldPilfer && mLockscreenShadeTransitionController.getQSDragProgress() == 0f
- && !mPrimaryBouncerInteractor.isInTransit()) {
+ // Execute the pilfer
+ if (shouldPilfer) {
mInputManager.pilferPointers(
mOverlay.getOverlayView().getViewRootImpl().getInputToken());
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java
index da71188c46c6..5536d83d8287 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java
@@ -1388,7 +1388,7 @@ public class UdfpsControllerTest extends SysuiTestCase {
}
@Test
- public void onTouch_withNewTouchDetection_doNotPilferWhenPullingUpBouncer()
+ public void onTouch_withNewTouchDetection_doNotProcessTouchWhenPullingUpBouncer()
throws RemoteException {
final NormalizedTouchData touchData = new NormalizedTouchData(0, 0f, 0f, 0f, 0f, 0f, 0L,
0L);
@@ -1427,8 +1427,10 @@ public class UdfpsControllerTest extends SysuiTestCase {
mBiometricExecutor.runAllReady();
moveEvent.recycle();
- // THEN the touch is NOT pilfered
- verify(mInputManager, never()).pilferPointers(any());
+ // THEN the touch is NOT processed
+ verify(mFingerprintManager, never()).onPointerDown(anyLong(), anyInt(), anyInt(),
+ anyFloat(), anyFloat(), anyFloat(), anyFloat(), anyFloat(), anyLong(), anyLong(),
+ anyBoolean());
}
@Test