Loading packages/SystemUI/src/com/android/keyguard/KeyguardFaceListenModel.kt +4 −5 Original line number Diff line number Diff line Loading @@ -41,10 +41,10 @@ data class KeyguardFaceListenModel( var listeningForFaceAssistant: Boolean = false, var occludingAppRequestingFaceAuth: Boolean = false, var postureAllowsListening: Boolean = false, var primaryUser: Boolean = false, var secureCameraLaunched: Boolean = false, var supportsDetect: Boolean = false, var switchingUser: Boolean = false, var systemUser: Boolean = false, var udfpsFingerDown: Boolean = false, var userNotTrustedOrDetectionIsNeeded: Boolean = false, ) : KeyguardListenModel() { Loading @@ -69,11 +69,11 @@ data class KeyguardFaceListenModel( keyguardGoingAway.toString(), listeningForFaceAssistant.toString(), occludingAppRequestingFaceAuth.toString(), primaryUser.toString(), postureAllowsListening.toString(), secureCameraLaunched.toString(), supportsDetect.toString(), switchingUser.toString(), systemUser.toString(), alternateBouncerShowing.toString(), udfpsFingerDown.toString(), userNotTrustedOrDetectionIsNeeded.toString(), Loading Loading @@ -109,12 +109,11 @@ data class KeyguardFaceListenModel( keyguardGoingAway = model.keyguardGoingAway listeningForFaceAssistant = model.listeningForFaceAssistant occludingAppRequestingFaceAuth = model.occludingAppRequestingFaceAuth primaryUser = model.primaryUser postureAllowsListening = model.postureAllowsListening secureCameraLaunched = model.secureCameraLaunched supportsDetect = model.supportsDetect switchingUser = model.switchingUser switchingUser = model.switchingUser systemUser = model.systemUser udfpsFingerDown = model.udfpsFingerDown userNotTrustedOrDetectionIsNeeded = model.userNotTrustedOrDetectionIsNeeded } Loading Loading @@ -153,11 +152,11 @@ data class KeyguardFaceListenModel( "keyguardGoingAway", "listeningForFaceAssistant", "occludingAppRequestingFaceAuth", "primaryUser", "postureAllowsListening", "secureCameraLaunched", "supportsDetect", "switchingUser", "systemUser", "udfpsBouncerShowing", "udfpsFingerDown", "userNotTrustedOrDetectionIsNeeded", Loading packages/SystemUI/src/com/android/keyguard/KeyguardFingerprintListenModel.kt +4 −4 Original line number Diff line number Diff line Loading @@ -41,11 +41,11 @@ data class KeyguardFingerprintListenModel( var keyguardIsVisible: Boolean = false, var keyguardOccluded: Boolean = false, var occludingAppRequestingFp: Boolean = false, var primaryUser: Boolean = false, var shouldListenSfpsState: Boolean = false, var shouldListenForFingerprintAssistant: Boolean = false, var strongerAuthRequired: Boolean = false, var switchingUser: Boolean = false, var systemUser: Boolean = false, var udfps: Boolean = false, var userDoesNotHaveTrust: Boolean = false, ) : KeyguardListenModel() { Loading @@ -72,11 +72,11 @@ data class KeyguardFingerprintListenModel( keyguardIsVisible.toString(), keyguardOccluded.toString(), occludingAppRequestingFp.toString(), primaryUser.toString(), shouldListenSfpsState.toString(), shouldListenForFingerprintAssistant.toString(), strongerAuthRequired.toString(), switchingUser.toString(), systemUser.toString(), udfps.toString(), userDoesNotHaveTrust.toString(), ) Loading Loading @@ -112,11 +112,11 @@ data class KeyguardFingerprintListenModel( keyguardIsVisible = model.keyguardIsVisible keyguardOccluded = model.keyguardOccluded occludingAppRequestingFp = model.occludingAppRequestingFp primaryUser = model.primaryUser shouldListenSfpsState = model.shouldListenSfpsState shouldListenForFingerprintAssistant = model.shouldListenForFingerprintAssistant strongerAuthRequired = model.strongerAuthRequired switchingUser = model.switchingUser systemUser = model.systemUser udfps = model.udfps userDoesNotHaveTrust = model.userDoesNotHaveTrust } Loading Loading @@ -158,11 +158,11 @@ data class KeyguardFingerprintListenModel( "keyguardIsVisible", "keyguardOccluded", "occludingAppRequestingFp", "primaryUser", "shouldListenSidFingerprintState", "shouldListenForFingerprintAssistant", "strongAuthRequired", "switchingUser", "systemUser", "underDisplayFingerprint", "userDoesNotHaveTrust", ) Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +8 −8 Original line number Diff line number Diff line Loading @@ -297,7 +297,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private final Context mContext; private final UserTracker mUserTracker; private final KeyguardUpdateMonitorLogger mLogger; private final boolean mIsPrimaryUser; private final boolean mIsSystemUser; private final AuthController mAuthController; private final UiEventLogger mUiEventLogger; private final Set<Integer> mFaceAcquiredInfoIgnoreList; Loading Loading @@ -2522,7 +2522,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE, FACE_AUTH_UPDATED_ON_KEYGUARD_INIT); TaskStackChangeListeners.getInstance().registerTaskStackListener(mTaskStackListener); mIsPrimaryUser = mUserManager.isPrimaryUser(); mIsSystemUser = mUserManager.isSystemUser(); int user = mUserTracker.getUserId(); mUserIsUnlocked.put(user, mUserManager.isUserUnlocked(user)); mLogoutEnabled = mDevicePolicyManager.isLogoutEnabled(); Loading Loading @@ -2968,7 +2968,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab || (mKeyguardOccluded && userDoesNotHaveTrust && mKeyguardShowing && (mOccludingAppRequestingFp || isUdfps || mAlternateBouncerShowing)); // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // Only listen if this KeyguardUpdateMonitor belongs to the system user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. final boolean biometricEnabledForUser = mBiometricEnabledForUser.get(user); final boolean userCanSkipBouncer = getUserCanSkipBouncer(user); Loading @@ -2977,7 +2977,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab !mSwitchingUser && !fingerprintDisabledForUser && (!mKeyguardGoingAway || !mDeviceInteractive) && mIsPrimaryUser && mIsSystemUser && biometricEnabledForUser && !isUserInLockdown(user); final boolean strongerAuthRequired = !isUnlockingWithFingerprintAllowed(); Loading Loading @@ -3021,11 +3021,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab isKeyguardVisible(), mKeyguardOccluded, mOccludingAppRequestingFp, mIsPrimaryUser, shouldListenSideFpsState, shouldListenForFingerprintAssistant, strongerAuthRequired, mSwitchingUser, mIsSystemUser, isUdfps, userDoesNotHaveTrust)); Loading Loading @@ -3070,7 +3070,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab final boolean shouldListenForFaceAssistant = shouldListenForFaceAssistant(); final boolean isUdfpsFingerDown = mAuthController.isUdfpsFingerDown(); final boolean isPostureAllowedForFaceAuth = doesPostureAllowFaceAuth(mPostureState); // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // Only listen if this KeyguardUpdateMonitor belongs to the system user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. final boolean shouldListen = (mPrimaryBouncerFullyShown Loading @@ -3082,7 +3082,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab || mAlternateBouncerShowing) && !mSwitchingUser && !faceDisabledForUser && userNotTrustedOrDetectionIsNeeded && !mKeyguardGoingAway && biometricEnabledForUser && faceAuthAllowedOrDetectionIsNeeded && mIsPrimaryUser && faceAuthAllowedOrDetectionIsNeeded && mIsSystemUser && (!mSecureCameraLaunched || mAlternateBouncerShowing) && faceAndFpNotAuthenticated && !mGoingToSleep Loading @@ -3108,10 +3108,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab shouldListenForFaceAssistant, mOccludingAppRequestingFace, isPostureAllowedForFaceAuth, mIsPrimaryUser, mSecureCameraLaunched, supportsDetect, mSwitchingUser, mIsSystemUser, isUdfpsFingerDown, userNotTrustedOrDetectionIsNeeded)); Loading packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt +0 −5 Original line number Diff line number Diff line Loading @@ -347,11 +347,6 @@ constructor( "nonStrongBiometricIsAllowed", faceAuthLog ), logAndObserve( userRepository.selectedUserInfo.map { it.isPrimary }, "userIsPrimaryUser", faceAuthLog ), ) .reduce(::and) .distinctUntilChanged() Loading packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +26 −26 Original line number Diff line number Diff line Loading @@ -291,7 +291,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { when(mSessionTracker.getSessionId(SESSION_KEYGUARD)).thenReturn(mKeyguardInstanceId); when(mUserManager.isUserUnlocked(anyInt())).thenReturn(true); when(mUserManager.isPrimaryUser()).thenReturn(true); currentUserIsSystem(); when(mStrongAuthTracker.getStub()).thenReturn(mock(IStrongAuthTracker.Stub.class)); when(mStrongAuthTracker .isUnlockingWithBiometricAllowed(anyBoolean() /* isClass3Biometric */)) Loading Loading @@ -960,7 +960,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { public void requestFaceAuth_whenFaceAuthWasStarted_returnsTrue() throws RemoteException { // This satisfies all the preconditions to run face auth. keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -1467,7 +1467,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Preconditions for sfps auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -1503,7 +1503,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // GIVEN Preconditions for sfps auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -1532,7 +1532,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // GIVEN Preconditions for sfps auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -1684,7 +1684,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. keyguardNotGoingAway(); occludingAppRequestsFaceAuth(); currentUserIsPrimary(); currentUserIsSystem(); primaryAuthNotRequiredByStrongAuthTracker(); biometricsEnabledForCurrentUser(); currentUserDoesNotHaveTrust(); Loading @@ -1705,7 +1705,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. bouncerFullyVisibleAndNotGoingToSleep(); keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); primaryAuthNotRequiredByStrongAuthTracker(); biometricsEnabledForCurrentUser(); currentUserDoesNotHaveTrust(); Loading @@ -1728,7 +1728,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. bouncerFullyVisibleAndNotGoingToSleep(); keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); primaryAuthNotRequiredByStrongAuthTracker(); biometricsEnabledForCurrentUser(); currentUserDoesNotHaveTrust(); Loading @@ -1749,7 +1749,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { public void testShouldListenForFace_whenUserIsNotPrimary_returnsFalse() throws RemoteException { cleanupKeyguardUpdateMonitor(); // This disables face auth when(mUserManager.isPrimaryUser()).thenReturn(false); when(mUserManager.isSystemUser()).thenReturn(false); mKeyguardUpdateMonitor = new TestableKeyguardUpdateMonitor(mContext); Loading @@ -1773,7 +1773,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); biometricsEnabledForCurrentUser(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); Loading @@ -1791,7 +1791,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1813,7 +1813,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1833,7 +1833,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1854,7 +1854,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1876,7 +1876,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { // Face auth should run when the following is true. keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1896,7 +1896,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { // Face auth should run when the following is true. keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1915,7 +1915,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { public void testShouldListenForFace_whenKeyguardIsAwake_returnsTrue() throws RemoteException { // Preconditions for face auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1940,7 +1940,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { public void testShouldListenForFace_whenUdfpsFingerDown_returnsTrue() throws RemoteException { // Preconditions for face auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1959,7 +1959,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { // Preconditions for face auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1977,7 +1977,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { // Preconditions for face auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -2002,7 +2002,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { // Preconditions for face auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -2324,7 +2324,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -2455,7 +2455,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { mKeyguardUpdateMonitor.mConfigFaceAuthSupportedPosture = DEVICE_POSTURE_CLOSED; keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -2479,7 +2479,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { mKeyguardUpdateMonitor.mConfigFaceAuthSupportedPosture = DEVICE_POSTURE_UNKNOWN; keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -2877,8 +2877,8 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { new FaceManager.AuthenticationResult(null, null, mCurrentUserId, false)); } private void currentUserIsPrimary() { when(mUserManager.isPrimaryUser()).thenReturn(true); private void currentUserIsSystem() { when(mUserManager.isSystemUser()).thenReturn(true); } private void biometricsNotDisabledThroughDevicePolicyManager() { Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardFaceListenModel.kt +4 −5 Original line number Diff line number Diff line Loading @@ -41,10 +41,10 @@ data class KeyguardFaceListenModel( var listeningForFaceAssistant: Boolean = false, var occludingAppRequestingFaceAuth: Boolean = false, var postureAllowsListening: Boolean = false, var primaryUser: Boolean = false, var secureCameraLaunched: Boolean = false, var supportsDetect: Boolean = false, var switchingUser: Boolean = false, var systemUser: Boolean = false, var udfpsFingerDown: Boolean = false, var userNotTrustedOrDetectionIsNeeded: Boolean = false, ) : KeyguardListenModel() { Loading @@ -69,11 +69,11 @@ data class KeyguardFaceListenModel( keyguardGoingAway.toString(), listeningForFaceAssistant.toString(), occludingAppRequestingFaceAuth.toString(), primaryUser.toString(), postureAllowsListening.toString(), secureCameraLaunched.toString(), supportsDetect.toString(), switchingUser.toString(), systemUser.toString(), alternateBouncerShowing.toString(), udfpsFingerDown.toString(), userNotTrustedOrDetectionIsNeeded.toString(), Loading Loading @@ -109,12 +109,11 @@ data class KeyguardFaceListenModel( keyguardGoingAway = model.keyguardGoingAway listeningForFaceAssistant = model.listeningForFaceAssistant occludingAppRequestingFaceAuth = model.occludingAppRequestingFaceAuth primaryUser = model.primaryUser postureAllowsListening = model.postureAllowsListening secureCameraLaunched = model.secureCameraLaunched supportsDetect = model.supportsDetect switchingUser = model.switchingUser switchingUser = model.switchingUser systemUser = model.systemUser udfpsFingerDown = model.udfpsFingerDown userNotTrustedOrDetectionIsNeeded = model.userNotTrustedOrDetectionIsNeeded } Loading Loading @@ -153,11 +152,11 @@ data class KeyguardFaceListenModel( "keyguardGoingAway", "listeningForFaceAssistant", "occludingAppRequestingFaceAuth", "primaryUser", "postureAllowsListening", "secureCameraLaunched", "supportsDetect", "switchingUser", "systemUser", "udfpsBouncerShowing", "udfpsFingerDown", "userNotTrustedOrDetectionIsNeeded", Loading
packages/SystemUI/src/com/android/keyguard/KeyguardFingerprintListenModel.kt +4 −4 Original line number Diff line number Diff line Loading @@ -41,11 +41,11 @@ data class KeyguardFingerprintListenModel( var keyguardIsVisible: Boolean = false, var keyguardOccluded: Boolean = false, var occludingAppRequestingFp: Boolean = false, var primaryUser: Boolean = false, var shouldListenSfpsState: Boolean = false, var shouldListenForFingerprintAssistant: Boolean = false, var strongerAuthRequired: Boolean = false, var switchingUser: Boolean = false, var systemUser: Boolean = false, var udfps: Boolean = false, var userDoesNotHaveTrust: Boolean = false, ) : KeyguardListenModel() { Loading @@ -72,11 +72,11 @@ data class KeyguardFingerprintListenModel( keyguardIsVisible.toString(), keyguardOccluded.toString(), occludingAppRequestingFp.toString(), primaryUser.toString(), shouldListenSfpsState.toString(), shouldListenForFingerprintAssistant.toString(), strongerAuthRequired.toString(), switchingUser.toString(), systemUser.toString(), udfps.toString(), userDoesNotHaveTrust.toString(), ) Loading Loading @@ -112,11 +112,11 @@ data class KeyguardFingerprintListenModel( keyguardIsVisible = model.keyguardIsVisible keyguardOccluded = model.keyguardOccluded occludingAppRequestingFp = model.occludingAppRequestingFp primaryUser = model.primaryUser shouldListenSfpsState = model.shouldListenSfpsState shouldListenForFingerprintAssistant = model.shouldListenForFingerprintAssistant strongerAuthRequired = model.strongerAuthRequired switchingUser = model.switchingUser systemUser = model.systemUser udfps = model.udfps userDoesNotHaveTrust = model.userDoesNotHaveTrust } Loading Loading @@ -158,11 +158,11 @@ data class KeyguardFingerprintListenModel( "keyguardIsVisible", "keyguardOccluded", "occludingAppRequestingFp", "primaryUser", "shouldListenSidFingerprintState", "shouldListenForFingerprintAssistant", "strongAuthRequired", "switchingUser", "systemUser", "underDisplayFingerprint", "userDoesNotHaveTrust", ) Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +8 −8 Original line number Diff line number Diff line Loading @@ -297,7 +297,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private final Context mContext; private final UserTracker mUserTracker; private final KeyguardUpdateMonitorLogger mLogger; private final boolean mIsPrimaryUser; private final boolean mIsSystemUser; private final AuthController mAuthController; private final UiEventLogger mUiEventLogger; private final Set<Integer> mFaceAcquiredInfoIgnoreList; Loading Loading @@ -2522,7 +2522,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE, FACE_AUTH_UPDATED_ON_KEYGUARD_INIT); TaskStackChangeListeners.getInstance().registerTaskStackListener(mTaskStackListener); mIsPrimaryUser = mUserManager.isPrimaryUser(); mIsSystemUser = mUserManager.isSystemUser(); int user = mUserTracker.getUserId(); mUserIsUnlocked.put(user, mUserManager.isUserUnlocked(user)); mLogoutEnabled = mDevicePolicyManager.isLogoutEnabled(); Loading Loading @@ -2968,7 +2968,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab || (mKeyguardOccluded && userDoesNotHaveTrust && mKeyguardShowing && (mOccludingAppRequestingFp || isUdfps || mAlternateBouncerShowing)); // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // Only listen if this KeyguardUpdateMonitor belongs to the system user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. final boolean biometricEnabledForUser = mBiometricEnabledForUser.get(user); final boolean userCanSkipBouncer = getUserCanSkipBouncer(user); Loading @@ -2977,7 +2977,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab !mSwitchingUser && !fingerprintDisabledForUser && (!mKeyguardGoingAway || !mDeviceInteractive) && mIsPrimaryUser && mIsSystemUser && biometricEnabledForUser && !isUserInLockdown(user); final boolean strongerAuthRequired = !isUnlockingWithFingerprintAllowed(); Loading Loading @@ -3021,11 +3021,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab isKeyguardVisible(), mKeyguardOccluded, mOccludingAppRequestingFp, mIsPrimaryUser, shouldListenSideFpsState, shouldListenForFingerprintAssistant, strongerAuthRequired, mSwitchingUser, mIsSystemUser, isUdfps, userDoesNotHaveTrust)); Loading Loading @@ -3070,7 +3070,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab final boolean shouldListenForFaceAssistant = shouldListenForFaceAssistant(); final boolean isUdfpsFingerDown = mAuthController.isUdfpsFingerDown(); final boolean isPostureAllowedForFaceAuth = doesPostureAllowFaceAuth(mPostureState); // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // Only listen if this KeyguardUpdateMonitor belongs to the system user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. final boolean shouldListen = (mPrimaryBouncerFullyShown Loading @@ -3082,7 +3082,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab || mAlternateBouncerShowing) && !mSwitchingUser && !faceDisabledForUser && userNotTrustedOrDetectionIsNeeded && !mKeyguardGoingAway && biometricEnabledForUser && faceAuthAllowedOrDetectionIsNeeded && mIsPrimaryUser && faceAuthAllowedOrDetectionIsNeeded && mIsSystemUser && (!mSecureCameraLaunched || mAlternateBouncerShowing) && faceAndFpNotAuthenticated && !mGoingToSleep Loading @@ -3108,10 +3108,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab shouldListenForFaceAssistant, mOccludingAppRequestingFace, isPostureAllowedForFaceAuth, mIsPrimaryUser, mSecureCameraLaunched, supportsDetect, mSwitchingUser, mIsSystemUser, isUdfpsFingerDown, userNotTrustedOrDetectionIsNeeded)); Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt +0 −5 Original line number Diff line number Diff line Loading @@ -347,11 +347,6 @@ constructor( "nonStrongBiometricIsAllowed", faceAuthLog ), logAndObserve( userRepository.selectedUserInfo.map { it.isPrimary }, "userIsPrimaryUser", faceAuthLog ), ) .reduce(::and) .distinctUntilChanged() Loading
packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +26 −26 Original line number Diff line number Diff line Loading @@ -291,7 +291,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { when(mSessionTracker.getSessionId(SESSION_KEYGUARD)).thenReturn(mKeyguardInstanceId); when(mUserManager.isUserUnlocked(anyInt())).thenReturn(true); when(mUserManager.isPrimaryUser()).thenReturn(true); currentUserIsSystem(); when(mStrongAuthTracker.getStub()).thenReturn(mock(IStrongAuthTracker.Stub.class)); when(mStrongAuthTracker .isUnlockingWithBiometricAllowed(anyBoolean() /* isClass3Biometric */)) Loading Loading @@ -960,7 +960,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { public void requestFaceAuth_whenFaceAuthWasStarted_returnsTrue() throws RemoteException { // This satisfies all the preconditions to run face auth. keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -1467,7 +1467,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Preconditions for sfps auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -1503,7 +1503,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // GIVEN Preconditions for sfps auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -1532,7 +1532,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // GIVEN Preconditions for sfps auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -1684,7 +1684,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. keyguardNotGoingAway(); occludingAppRequestsFaceAuth(); currentUserIsPrimary(); currentUserIsSystem(); primaryAuthNotRequiredByStrongAuthTracker(); biometricsEnabledForCurrentUser(); currentUserDoesNotHaveTrust(); Loading @@ -1705,7 +1705,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. bouncerFullyVisibleAndNotGoingToSleep(); keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); primaryAuthNotRequiredByStrongAuthTracker(); biometricsEnabledForCurrentUser(); currentUserDoesNotHaveTrust(); Loading @@ -1728,7 +1728,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. bouncerFullyVisibleAndNotGoingToSleep(); keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); primaryAuthNotRequiredByStrongAuthTracker(); biometricsEnabledForCurrentUser(); currentUserDoesNotHaveTrust(); Loading @@ -1749,7 +1749,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { public void testShouldListenForFace_whenUserIsNotPrimary_returnsFalse() throws RemoteException { cleanupKeyguardUpdateMonitor(); // This disables face auth when(mUserManager.isPrimaryUser()).thenReturn(false); when(mUserManager.isSystemUser()).thenReturn(false); mKeyguardUpdateMonitor = new TestableKeyguardUpdateMonitor(mContext); Loading @@ -1773,7 +1773,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); biometricsEnabledForCurrentUser(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); Loading @@ -1791,7 +1791,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1813,7 +1813,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1833,7 +1833,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1854,7 +1854,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // Face auth should run when the following is true. keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1876,7 +1876,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { // Face auth should run when the following is true. keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1896,7 +1896,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { // Face auth should run when the following is true. keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1915,7 +1915,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { public void testShouldListenForFace_whenKeyguardIsAwake_returnsTrue() throws RemoteException { // Preconditions for face auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1940,7 +1940,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { public void testShouldListenForFace_whenUdfpsFingerDown_returnsTrue() throws RemoteException { // Preconditions for face auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1959,7 +1959,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { // Preconditions for face auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -1977,7 +1977,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { // Preconditions for face auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -2002,7 +2002,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { // Preconditions for face auth to run keyguardNotGoingAway(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -2324,7 +2324,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { throws RemoteException { keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -2455,7 +2455,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { mKeyguardUpdateMonitor.mConfigFaceAuthSupportedPosture = DEVICE_POSTURE_CLOSED; keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading @@ -2479,7 +2479,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { mKeyguardUpdateMonitor.mConfigFaceAuthSupportedPosture = DEVICE_POSTURE_UNKNOWN; keyguardNotGoingAway(); bouncerFullyVisibleAndNotGoingToSleep(); currentUserIsPrimary(); currentUserIsSystem(); currentUserDoesNotHaveTrust(); biometricsNotDisabledThroughDevicePolicyManager(); biometricsEnabledForCurrentUser(); Loading Loading @@ -2877,8 +2877,8 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { new FaceManager.AuthenticationResult(null, null, mCurrentUserId, false)); } private void currentUserIsPrimary() { when(mUserManager.isPrimaryUser()).thenReturn(true); private void currentUserIsSystem() { when(mUserManager.isSystemUser()).thenReturn(true); } private void biometricsNotDisabledThroughDevicePolicyManager() { Loading