From ae2702d1d6b7f7f0fb05aac68964bc6fb5927df7 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Wed, 19 Jun 2019 18:04:05 -0700 Subject: [PATCH] Not bypassing when the user is expanding quick settings Previously we would also bypass when the user would look at QS. Fixes: 134094877 Test: pull down QS, wait on bypass, nothing happens! Change-Id: I0b2ec98f3c361307845c16cc27866c6f3b3d4136 --- .../statusbar/phone/KeyguardBypassController.kt | 10 +++++++++- .../statusbar/phone/NotificationPanelView.java | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt index 4be4d908979f2..fbd6adc9b7aa9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt @@ -49,6 +49,14 @@ class KeyguardBypassController { private set var bouncerShowing: Boolean = false + var qSExpanded = false + set(value) { + val changed = field != value + field = value + if (changed && !value) { + maybePerformPendingUnlock() + } + } @Inject constructor(context: Context, tunerService: TunerService, @@ -98,7 +106,7 @@ class KeyguardBypassController { // to unlock return false } - if (isPulseExpanding) { + if (isPulseExpanding || qSExpanded) { pendingUnlockType = biometricSourceType return false } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index e805575e38846..bbbb9b11cab72 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -1384,6 +1384,7 @@ public class NotificationPanelView extends PanelView implements mStatusBar.setQsExpanded(expanded); mNotificationContainerParent.setQsExpanded(expanded); mPulseExpansionHandler.setQsExpanded(expanded); + mKeyguardBypassController.setQSExpanded(expanded); } }