From d038189709427aecffb84a3e83086f09f46bc714 Mon Sep 17 00:00:00 2001 From: Kevin Chyn Date: Thu, 11 Jul 2019 16:25:36 -0700 Subject: [PATCH] Reset mSecureCameraLaunched when bouncer is shown Whenever the bouncer is shown, face auth should start again. Fixes: 137228869 Test: Install test camera app that's available on lockscreen, double tap power to launch camera on lock screen. Bouncer is shown, and face unlock works Change-Id: Ia33075935c6d8413ab7c9351739cca67bb81c377 --- .../com/android/keyguard/KeyguardUpdateMonitor.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 05e14a779a172..2eb93d3a60754 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -2203,6 +2203,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { if (DEBUG) Log.d(TAG, "handleKeyguardBouncerChanged(" + bouncer + ")"); boolean isBouncer = (bouncer == 1); mBouncer = isBouncer; + + if (isBouncer) { + // If the bouncer is shown, always clear this flag. This can happen in the following + // situations: 1) Default camera with SHOW_WHEN_LOCKED is not chosen yet. 2) Secure + // camera requests dismiss keyguard (tapping on photos for example). When these happen, + // face auth should resume. + mSecureCameraLaunched = false; + } + for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { @@ -2649,6 +2658,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { pw.println(" strongAuthFlags=" + Integer.toHexString(strongAuthFlags)); pw.println(" trustManaged=" + getUserTrustIsManaged(userId)); pw.println(" enabledByUser=" + mFaceSettingEnabledForUser); + pw.println(" mSecureCameraLaunched=" + mSecureCameraLaunched); } } }