Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d54cd01f authored by jie shen's avatar jie shen Committed by Robert Chou
Browse files

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
parent 2f9678b0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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