Loading packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardFaceAuthManager.kt→packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt +8 −8 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ import kotlinx.coroutines.withContext * API to run face authentication and detection for device entry / on keyguard (as opposed to the * biometric prompt). */ interface KeyguardFaceAuthManager { interface DeviceEntryFaceAuthRepository { /** Provide the current face authentication state for device entry. */ val isAuthenticated: Flow<Boolean> Loading Loading @@ -108,7 +108,7 @@ interface KeyguardFaceAuthManager { } @SysUISingleton class KeyguardFaceAuthManagerImpl class DeviceEntryFaceAuthRepositoryImpl @Inject constructor( context: Context, Loading @@ -127,7 +127,7 @@ constructor( private val keyguardInteractor: KeyguardInteractor, private val alternateBouncerInteractor: AlternateBouncerInteractor, dumpManager: DumpManager, ) : KeyguardFaceAuthManager, Dumpable { ) : DeviceEntryFaceAuthRepository, Dumpable { private var authCancellationSignal: CancellationSignal? = null private var detectCancellationSignal: CancellationSignal? = null private var faceAcquiredInfoIgnoreList: Set<Int> Loading @@ -144,13 +144,13 @@ constructor( get() = _detectionStatus.filterNotNull() private val _isLockedOut = MutableStateFlow(false) override val isLockedOut: Flow<Boolean> = _isLockedOut override val isLockedOut: StateFlow<Boolean> = _isLockedOut val isDetectionSupported = faceManager?.sensorPropertiesInternal?.firstOrNull()?.supportsFaceDetection ?: false private val _isAuthRunning = MutableStateFlow(false) override val isAuthRunning: Flow<Boolean> override val isAuthRunning: StateFlow<Boolean> get() = _isAuthRunning private val keyguardSessionId: InstanceId? Loading Loading @@ -199,7 +199,7 @@ constructor( ) .boxed() .collect(Collectors.toSet()) dumpManager.registerCriticalDumpable("KeyguardFaceAuthManagerImpl", this) dumpManager.registerCriticalDumpable("DeviceEntryFaceAuthRepositoryImpl", this) observeFaceAuthGatingChecks() observeFaceDetectGatingChecks() Loading Loading @@ -495,7 +495,7 @@ constructor( } companion object { const val TAG = "KeyguardFaceAuthManager" const val TAG = "DeviceEntryFaceAuthRepository" /** * If no cancel signal has been received after this amount of time, assume that it is Loading @@ -505,7 +505,7 @@ constructor( } override fun dump(pw: PrintWriter, args: Array<out String>) { pw.println("KeyguardFaceAuthManagerImpl state:") pw.println("DeviceEntryFaceAuthRepositoryImpl state:") pw.println(" cancellationInProgress: $cancellationInProgress") pw.println(" _isLockedOut.value: ${_isLockedOut.value}") pw.println(" _isAuthRunning.value: ${_isAuthRunning.value}") Loading packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardFaceAuthModule.kt +4 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,10 @@ import dagger.Module @Module interface KeyguardFaceAuthModule { @Binds fun faceAuthManager(impl: KeyguardFaceAuthManagerImpl): KeyguardFaceAuthManager @Binds fun deviceEntryFaceAuthRepository( impl: DeviceEntryFaceAuthRepositoryImpl ): DeviceEntryFaceAuthRepository @Binds fun trustRepository(impl: TrustRepositoryImpl): TrustRepository } packages/SystemUI/src/com/android/systemui/keyguard/shared/model/FaceAuthenticationModels.kt +4 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,10 @@ package com.android.systemui.keyguard.shared.model import android.hardware.face.FaceManager /** Authentication status provided by [com.android.keyguard.faceauth.KeyguardFaceAuthManager] */ /** * Authentication status provided by * [com.android.systemui.keyguard.data.repository.DeviceEntryFaceAuthRepository] */ sealed class AuthenticationStatus /** Success authentication status. */ Loading packages/SystemUI/src/com/android/systemui/log/FaceAuthenticationLogger.kt +3 −3 Original line number Diff line number Diff line Loading @@ -9,15 +9,15 @@ import com.android.systemui.plugins.log.LogBuffer import com.android.systemui.plugins.log.LogLevel.DEBUG import javax.inject.Inject private const val TAG = "KeyguardFaceAuthManagerLog" private const val TAG = "DeviceEntryFaceAuthRepositoryLog" /** * Helper class for logging for * [com.android.systemui.keyguard.data.repository.KeyguardFaceAuthManager] * [com.android.systemui.keyguard.data.repository.DeviceEntryFaceAuthRepository] * * To enable logcat echoing for an entire buffer: * ``` * adb shell settings put global systemui/buffer/KeyguardFaceAuthManagerLog <logLevel> * adb shell settings put global systemui/buffer/DeviceEntryFaceAuthRepositoryLog <logLevel> * * ``` */ Loading packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java +2 −2 Original line number Diff line number Diff line Loading @@ -367,13 +367,13 @@ public class LogModule { /** * Provides a {@link LogBuffer} for use by * {@link com.android.keyguard.faceauth.KeyguardFaceAuthManagerImpl}. * {@link com.android.systemui.keyguard.data.repository.DeviceEntryFaceAuthRepositoryImpl}. */ @Provides @SysUISingleton @FaceAuthLog public static LogBuffer provideFaceAuthLog(LogBufferFactory factory) { return factory.create("KeyguardFaceAuthManagerLog", 300); return factory.create("DeviceEntryFaceAuthRepositoryLog", 300); } /** Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardFaceAuthManager.kt→packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt +8 −8 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ import kotlinx.coroutines.withContext * API to run face authentication and detection for device entry / on keyguard (as opposed to the * biometric prompt). */ interface KeyguardFaceAuthManager { interface DeviceEntryFaceAuthRepository { /** Provide the current face authentication state for device entry. */ val isAuthenticated: Flow<Boolean> Loading Loading @@ -108,7 +108,7 @@ interface KeyguardFaceAuthManager { } @SysUISingleton class KeyguardFaceAuthManagerImpl class DeviceEntryFaceAuthRepositoryImpl @Inject constructor( context: Context, Loading @@ -127,7 +127,7 @@ constructor( private val keyguardInteractor: KeyguardInteractor, private val alternateBouncerInteractor: AlternateBouncerInteractor, dumpManager: DumpManager, ) : KeyguardFaceAuthManager, Dumpable { ) : DeviceEntryFaceAuthRepository, Dumpable { private var authCancellationSignal: CancellationSignal? = null private var detectCancellationSignal: CancellationSignal? = null private var faceAcquiredInfoIgnoreList: Set<Int> Loading @@ -144,13 +144,13 @@ constructor( get() = _detectionStatus.filterNotNull() private val _isLockedOut = MutableStateFlow(false) override val isLockedOut: Flow<Boolean> = _isLockedOut override val isLockedOut: StateFlow<Boolean> = _isLockedOut val isDetectionSupported = faceManager?.sensorPropertiesInternal?.firstOrNull()?.supportsFaceDetection ?: false private val _isAuthRunning = MutableStateFlow(false) override val isAuthRunning: Flow<Boolean> override val isAuthRunning: StateFlow<Boolean> get() = _isAuthRunning private val keyguardSessionId: InstanceId? Loading Loading @@ -199,7 +199,7 @@ constructor( ) .boxed() .collect(Collectors.toSet()) dumpManager.registerCriticalDumpable("KeyguardFaceAuthManagerImpl", this) dumpManager.registerCriticalDumpable("DeviceEntryFaceAuthRepositoryImpl", this) observeFaceAuthGatingChecks() observeFaceDetectGatingChecks() Loading Loading @@ -495,7 +495,7 @@ constructor( } companion object { const val TAG = "KeyguardFaceAuthManager" const val TAG = "DeviceEntryFaceAuthRepository" /** * If no cancel signal has been received after this amount of time, assume that it is Loading @@ -505,7 +505,7 @@ constructor( } override fun dump(pw: PrintWriter, args: Array<out String>) { pw.println("KeyguardFaceAuthManagerImpl state:") pw.println("DeviceEntryFaceAuthRepositoryImpl state:") pw.println(" cancellationInProgress: $cancellationInProgress") pw.println(" _isLockedOut.value: ${_isLockedOut.value}") pw.println(" _isAuthRunning.value: ${_isAuthRunning.value}") Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardFaceAuthModule.kt +4 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,10 @@ import dagger.Module @Module interface KeyguardFaceAuthModule { @Binds fun faceAuthManager(impl: KeyguardFaceAuthManagerImpl): KeyguardFaceAuthManager @Binds fun deviceEntryFaceAuthRepository( impl: DeviceEntryFaceAuthRepositoryImpl ): DeviceEntryFaceAuthRepository @Binds fun trustRepository(impl: TrustRepositoryImpl): TrustRepository }
packages/SystemUI/src/com/android/systemui/keyguard/shared/model/FaceAuthenticationModels.kt +4 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,10 @@ package com.android.systemui.keyguard.shared.model import android.hardware.face.FaceManager /** Authentication status provided by [com.android.keyguard.faceauth.KeyguardFaceAuthManager] */ /** * Authentication status provided by * [com.android.systemui.keyguard.data.repository.DeviceEntryFaceAuthRepository] */ sealed class AuthenticationStatus /** Success authentication status. */ Loading
packages/SystemUI/src/com/android/systemui/log/FaceAuthenticationLogger.kt +3 −3 Original line number Diff line number Diff line Loading @@ -9,15 +9,15 @@ import com.android.systemui.plugins.log.LogBuffer import com.android.systemui.plugins.log.LogLevel.DEBUG import javax.inject.Inject private const val TAG = "KeyguardFaceAuthManagerLog" private const val TAG = "DeviceEntryFaceAuthRepositoryLog" /** * Helper class for logging for * [com.android.systemui.keyguard.data.repository.KeyguardFaceAuthManager] * [com.android.systemui.keyguard.data.repository.DeviceEntryFaceAuthRepository] * * To enable logcat echoing for an entire buffer: * ``` * adb shell settings put global systemui/buffer/KeyguardFaceAuthManagerLog <logLevel> * adb shell settings put global systemui/buffer/DeviceEntryFaceAuthRepositoryLog <logLevel> * * ``` */ Loading
packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java +2 −2 Original line number Diff line number Diff line Loading @@ -367,13 +367,13 @@ public class LogModule { /** * Provides a {@link LogBuffer} for use by * {@link com.android.keyguard.faceauth.KeyguardFaceAuthManagerImpl}. * {@link com.android.systemui.keyguard.data.repository.DeviceEntryFaceAuthRepositoryImpl}. */ @Provides @SysUISingleton @FaceAuthLog public static LogBuffer provideFaceAuthLog(LogBufferFactory factory) { return factory.create("KeyguardFaceAuthManagerLog", 300); return factory.create("DeviceEntryFaceAuthRepositoryLog", 300); } /** Loading