Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +11 −7 Original line number Diff line number Diff line Loading @@ -105,11 +105,6 @@ import java.util.function.Consumer; * Watches for updates that may be interesting to the keyguard, and provides * the up to date information as well as a registration for callbacks that care * to be updated. * * Note: under time crunch, this has been extended to include some stuff that * doesn't really belong here. see {@link #handleBatteryUpdate} where it shutdowns * the device, and {@link #getFailedUnlockAttempts()}, {@link #reportFailedAttempt()} * and {@link #clearFailedUnlockAttempts()}. Maybe we should rename this 'KeyguardContext'... */ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { Loading Loading @@ -1568,6 +1563,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { updateFaceListeningState(); } /** * Requests face authentication if we're on a state where it's allowed. * This will re-trigger auth in case it fails. */ public void requestFaceAuth() { if (DEBUG) Log.d(TAG, "requestFaceAuth()"); updateFaceListeningState(); } private void updateFaceListeningState() { // If this message exists, we should not authenticate again until this message is // consumed by the handler Loading Loading @@ -1629,7 +1633,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { return; } if (DEBUG) Log.v(TAG, "startListeningForFingerprint()"); int userId = ActivityManager.getCurrentUser(); int userId = getCurrentUser(); if (isUnlockWithFingerprintPossible(userId)) { if (mFingerprintCancelSignal != null) { mFingerprintCancelSignal.cancel(); Loading @@ -1647,7 +1651,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { return; } if (DEBUG) Log.v(TAG, "startListeningForFace()"); int userId = ActivityManager.getCurrentUser(); int userId = getCurrentUser(); if (isUnlockWithFacePossible(userId)) { if (mFaceCancelSignal != null) { mFaceCancelSignal.cancel(); Loading packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +3 −0 Original line number Diff line number Diff line Loading @@ -664,6 +664,9 @@ public class KeyguardIndicationController implements StateListener { public void onBiometricRunningStateChanged(boolean running, BiometricSourceType biometricSourceType) { if (running) { // Let's hide any previous messages when authentication starts, otherwise // multiple auth attempts would overlap. hideTransientIndication(); mMessageToShowOnScreenOn = null; } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −0 Original line number Diff line number Diff line Loading @@ -1235,6 +1235,12 @@ public class NotificationPanelView extends PanelView implements setQsExpansion(height); requestPanelHeightUpdate(); mNotificationStackScroller.checkSnoozeLeavebehind(); // When expanding QS, let's authenticate the user if possible, // this will speed up notification actions. if (height == 0) { mStatusBar.requestFaceAuth(); } } private void setQsExpanded(boolean expanded) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +9 −0 Original line number Diff line number Diff line Loading @@ -1315,6 +1315,15 @@ public class StatusBar extends SystemUI implements DemoMode, mEntryManager.updateNotifications(); } /** * Asks {@link KeyguardUpdateMonitor} to run face auth. */ public void requestFaceAuth() { if (!mUnlockMethodCache.canSkipBouncer()) { mKeyguardUpdateMonitor.requestFaceAuth(); } } public void updateAreThereNotifications() { if (SPEW) { final boolean clearable = hasActiveNotifications() && Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +11 −7 Original line number Diff line number Diff line Loading @@ -105,11 +105,6 @@ import java.util.function.Consumer; * Watches for updates that may be interesting to the keyguard, and provides * the up to date information as well as a registration for callbacks that care * to be updated. * * Note: under time crunch, this has been extended to include some stuff that * doesn't really belong here. see {@link #handleBatteryUpdate} where it shutdowns * the device, and {@link #getFailedUnlockAttempts()}, {@link #reportFailedAttempt()} * and {@link #clearFailedUnlockAttempts()}. Maybe we should rename this 'KeyguardContext'... */ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { Loading Loading @@ -1568,6 +1563,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { updateFaceListeningState(); } /** * Requests face authentication if we're on a state where it's allowed. * This will re-trigger auth in case it fails. */ public void requestFaceAuth() { if (DEBUG) Log.d(TAG, "requestFaceAuth()"); updateFaceListeningState(); } private void updateFaceListeningState() { // If this message exists, we should not authenticate again until this message is // consumed by the handler Loading Loading @@ -1629,7 +1633,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { return; } if (DEBUG) Log.v(TAG, "startListeningForFingerprint()"); int userId = ActivityManager.getCurrentUser(); int userId = getCurrentUser(); if (isUnlockWithFingerprintPossible(userId)) { if (mFingerprintCancelSignal != null) { mFingerprintCancelSignal.cancel(); Loading @@ -1647,7 +1651,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { return; } if (DEBUG) Log.v(TAG, "startListeningForFace()"); int userId = ActivityManager.getCurrentUser(); int userId = getCurrentUser(); if (isUnlockWithFacePossible(userId)) { if (mFaceCancelSignal != null) { mFaceCancelSignal.cancel(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +3 −0 Original line number Diff line number Diff line Loading @@ -664,6 +664,9 @@ public class KeyguardIndicationController implements StateListener { public void onBiometricRunningStateChanged(boolean running, BiometricSourceType biometricSourceType) { if (running) { // Let's hide any previous messages when authentication starts, otherwise // multiple auth attempts would overlap. hideTransientIndication(); mMessageToShowOnScreenOn = null; } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −0 Original line number Diff line number Diff line Loading @@ -1235,6 +1235,12 @@ public class NotificationPanelView extends PanelView implements setQsExpansion(height); requestPanelHeightUpdate(); mNotificationStackScroller.checkSnoozeLeavebehind(); // When expanding QS, let's authenticate the user if possible, // this will speed up notification actions. if (height == 0) { mStatusBar.requestFaceAuth(); } } private void setQsExpanded(boolean expanded) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +9 −0 Original line number Diff line number Diff line Loading @@ -1315,6 +1315,15 @@ public class StatusBar extends SystemUI implements DemoMode, mEntryManager.updateNotifications(); } /** * Asks {@link KeyguardUpdateMonitor} to run face auth. */ public void requestFaceAuth() { if (!mUnlockMethodCache.canSkipBouncer()) { mKeyguardUpdateMonitor.requestFaceAuth(); } } public void updateAreThereNotifications() { if (SPEW) { final boolean clearable = hasActiveNotifications() && Loading