From d54cd01f234fc2d284b3e30cb8106c78a054f608 Mon Sep 17 00:00:00 2001 From: jie shen Date: Wed, 29 Jul 2020 10:27:51 +0800 Subject: [PATCH] Add isFaceAuthEnabledForUser checks in KeyguardLiftController When request pick gesture sensor, judge that if the current user does not turn on the face unlocking function, the sensor should not be Listening Fixes: 161954958 Test: presubmit Change-Id: I34552315049e07f123403fe693251edb460fef5d --- .../systemui/statusbar/phone/KeyguardLiftController.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt index f7b8a2e29129f..a791e7307ba8e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt @@ -73,7 +73,9 @@ class KeyguardLiftController constructor( val onKeyguard = keyguardUpdateMonitor.isKeyguardVisible && !statusBarStateController.isDozing - val shouldListen = onKeyguard || bouncerVisible + val userId = KeyguardUpdateMonitor.getCurrentUser() + val isFaceEnabled = keyguardUpdateMonitor.isFaceAuthEnabledForUser(userId) + val shouldListen = (onKeyguard || bouncerVisible) && isFaceEnabled if (shouldListen != isListening) { isListening = shouldListen @@ -84,4 +86,4 @@ class KeyguardLiftController constructor( } } } -} \ No newline at end of file +}