Loading packages/SystemUI/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -889,4 +889,8 @@ --> <dimen name="shade_swipe_collapse_threshold">0.5</dimen> <!-- [END] MULTI SHADE --> <!-- Time (in ms) to delay the bouncer views from showing when passive auth may be used for device entry. --> <integer name="primary_bouncer_passive_auth_delay">250</integer> </resources> packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +27 −13 Original line number Diff line number Diff line Loading @@ -2884,7 +2884,19 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); } /** * If the current state of the device allows for triggering active unlock. This does not * include active unlock availability. */ public boolean canTriggerActiveUnlockBasedOnDeviceState() { return shouldTriggerActiveUnlock(/* shouldLog */ false); } private boolean shouldTriggerActiveUnlock() { return shouldTriggerActiveUnlock(/* shouldLog */ true); } private boolean shouldTriggerActiveUnlock(boolean shouldLog) { // Triggers: final boolean triggerActiveUnlockForAssistant = shouldTriggerActiveUnlockForAssistant(); final boolean awakeKeyguard = mPrimaryBouncerFullyShown || mAlternateBouncerShowing Loading Loading @@ -2914,6 +2926,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab && !mKeyguardGoingAway && !mSecureCameraLaunched; if (shouldLog) { // Aggregate relevant fields for debug logging. logListenerModelData( new KeyguardActiveUnlockModel( Loading @@ -2927,6 +2940,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mSwitchingUser, triggerActiveUnlockForAssistant, userCanDismissLockScreen)); } return shouldTriggerActiveUnlock; } Loading packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardFaceAuthModule.kt +0 −2 Original line number Diff line number Diff line Loading @@ -46,8 +46,6 @@ interface KeyguardFaceAuthModule { impl: SystemUIKeyguardFaceAuthInteractor ): KeyguardFaceAuthInteractor @Binds fun trustRepository(impl: TrustRepositoryImpl): TrustRepository companion object { @Provides @SysUISingleton Loading packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryModule.kt +2 −0 Original line number Diff line number Diff line Loading @@ -45,4 +45,6 @@ interface KeyguardRepositoryModule { @Binds fun keyguardBouncerRepository(impl: KeyguardBouncerRepositoryImpl): KeyguardBouncerRepository @Binds fun trustRepository(impl: TrustRepositoryImpl): TrustRepository } packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt +14 −7 Original line number Diff line number Diff line Loading @@ -28,7 +28,9 @@ import javax.inject.Inject import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.map Loading @@ -40,6 +42,9 @@ import kotlinx.coroutines.flow.shareIn interface TrustRepository { /** Flow representing whether the current user is trusted. */ val isCurrentUserTrusted: Flow<Boolean> /** Flow representing whether active unlock is available for the current user. */ val isCurrentUserActiveUnlockAvailable: StateFlow<Boolean> } @SysUISingleton Loading Loading @@ -89,11 +94,13 @@ constructor( } .shareIn(applicationScope, started = SharingStarted.Eagerly, replay = 1) override val isCurrentUserTrusted: Flow<Boolean> get() = override val isCurrentUserTrusted: Flow<Boolean> = combine(trust, userRepository.selectedUserInfo, ::Pair) .map { latestTrustModelForUser[it.second.id]?.isTrusted ?: false } .distinctUntilChanged() .onEach { logger.isCurrentUserTrusted(it) } .onStart { emit(false) } // TODO: Implement based on TrustManager callback b/267322286 override val isCurrentUserActiveUnlockAvailable: StateFlow<Boolean> = MutableStateFlow(true) } Loading
packages/SystemUI/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -889,4 +889,8 @@ --> <dimen name="shade_swipe_collapse_threshold">0.5</dimen> <!-- [END] MULTI SHADE --> <!-- Time (in ms) to delay the bouncer views from showing when passive auth may be used for device entry. --> <integer name="primary_bouncer_passive_auth_delay">250</integer> </resources>
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +27 −13 Original line number Diff line number Diff line Loading @@ -2884,7 +2884,19 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); } /** * If the current state of the device allows for triggering active unlock. This does not * include active unlock availability. */ public boolean canTriggerActiveUnlockBasedOnDeviceState() { return shouldTriggerActiveUnlock(/* shouldLog */ false); } private boolean shouldTriggerActiveUnlock() { return shouldTriggerActiveUnlock(/* shouldLog */ true); } private boolean shouldTriggerActiveUnlock(boolean shouldLog) { // Triggers: final boolean triggerActiveUnlockForAssistant = shouldTriggerActiveUnlockForAssistant(); final boolean awakeKeyguard = mPrimaryBouncerFullyShown || mAlternateBouncerShowing Loading Loading @@ -2914,6 +2926,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab && !mKeyguardGoingAway && !mSecureCameraLaunched; if (shouldLog) { // Aggregate relevant fields for debug logging. logListenerModelData( new KeyguardActiveUnlockModel( Loading @@ -2927,6 +2940,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mSwitchingUser, triggerActiveUnlockForAssistant, userCanDismissLockScreen)); } return shouldTriggerActiveUnlock; } Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardFaceAuthModule.kt +0 −2 Original line number Diff line number Diff line Loading @@ -46,8 +46,6 @@ interface KeyguardFaceAuthModule { impl: SystemUIKeyguardFaceAuthInteractor ): KeyguardFaceAuthInteractor @Binds fun trustRepository(impl: TrustRepositoryImpl): TrustRepository companion object { @Provides @SysUISingleton Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryModule.kt +2 −0 Original line number Diff line number Diff line Loading @@ -45,4 +45,6 @@ interface KeyguardRepositoryModule { @Binds fun keyguardBouncerRepository(impl: KeyguardBouncerRepositoryImpl): KeyguardBouncerRepository @Binds fun trustRepository(impl: TrustRepositoryImpl): TrustRepository }
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt +14 −7 Original line number Diff line number Diff line Loading @@ -28,7 +28,9 @@ import javax.inject.Inject import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.map Loading @@ -40,6 +42,9 @@ import kotlinx.coroutines.flow.shareIn interface TrustRepository { /** Flow representing whether the current user is trusted. */ val isCurrentUserTrusted: Flow<Boolean> /** Flow representing whether active unlock is available for the current user. */ val isCurrentUserActiveUnlockAvailable: StateFlow<Boolean> } @SysUISingleton Loading Loading @@ -89,11 +94,13 @@ constructor( } .shareIn(applicationScope, started = SharingStarted.Eagerly, replay = 1) override val isCurrentUserTrusted: Flow<Boolean> get() = override val isCurrentUserTrusted: Flow<Boolean> = combine(trust, userRepository.selectedUserInfo, ::Pair) .map { latestTrustModelForUser[it.second.id]?.isTrusted ?: false } .distinctUntilChanged() .onEach { logger.isCurrentUserTrusted(it) } .onStart { emit(false) } // TODO: Implement based on TrustManager callback b/267322286 override val isCurrentUserActiveUnlockAvailable: StateFlow<Boolean> = MutableStateFlow(true) }