Loading packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/FingerprintPropertyInteractor.kt +0 −10 Original line number Original line Diff line number Diff line Loading @@ -47,7 +47,6 @@ constructor( private val repository: FingerprintPropertyRepository, private val repository: FingerprintPropertyRepository, @Main private val configurationInteractor: ConfigurationInteractor, @Main private val configurationInteractor: ConfigurationInteractor, displayStateInteractor: DisplayStateInteractor, displayStateInteractor: DisplayStateInteractor, udfpsOverlayInteractor: UdfpsOverlayInteractor, ) { ) { val propertiesInitialized: Flow<Boolean> = repository.propertiesInitialized val propertiesInitialized: Flow<Boolean> = repository.propertiesInitialized val isUdfps: StateFlow<Boolean> = val isUdfps: StateFlow<Boolean> = Loading Loading @@ -118,15 +117,6 @@ constructor( ) ) } } /** * Sensor location for the: * - current physical display * - current screen resolution * - device's current orientation */ val udfpsSensorBounds: Flow<Rect> = udfpsOverlayInteractor.udfpsOverlayParams.map { it.sensorBounds }.distinctUntilChanged() companion object { companion object { private const val EMPTY_DISPLAY_ID = "" private const val EMPTY_DISPLAY_ID = "" Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerUdfpsIconViewModel.kt +12 −2 Original line number Original line Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.keyguard.ui.viewmodel package com.android.systemui.keyguard.ui.viewmodel import android.content.Context import android.content.Context import android.graphics.Rect import com.android.settingslib.Utils import com.android.settingslib.Utils import com.android.systemui.accessibility.domain.interactor.AccessibilityInteractor import com.android.systemui.accessibility.domain.interactor.AccessibilityInteractor import com.android.systemui.biometrics.domain.interactor.FingerprintPropertyInteractor import com.android.systemui.biometrics.domain.interactor.FingerprintPropertyInteractor Loading @@ -31,6 +32,7 @@ import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager import javax.inject.Inject import javax.inject.Inject import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.flowOf Loading @@ -45,7 +47,6 @@ constructor( @ShadeDisplayAware configurationInteractor: ConfigurationInteractor, @ShadeDisplayAware configurationInteractor: ConfigurationInteractor, deviceEntryUdfpsInteractor: DeviceEntryUdfpsInteractor, deviceEntryUdfpsInteractor: DeviceEntryUdfpsInteractor, deviceEntryBackgroundViewModel: DeviceEntryBackgroundViewModel, deviceEntryBackgroundViewModel: DeviceEntryBackgroundViewModel, fingerprintPropertyInteractor: FingerprintPropertyInteractor, udfpsOverlayInteractor: UdfpsOverlayInteractor, udfpsOverlayInteractor: UdfpsOverlayInteractor, alternateBouncerViewModel: AlternateBouncerViewModel, alternateBouncerViewModel: AlternateBouncerViewModel, private val statusBarKeyguardViewManager: StatusBarKeyguardViewManager, private val statusBarKeyguardViewManager: StatusBarKeyguardViewManager, Loading @@ -58,6 +59,15 @@ constructor( clamp(it * 2f, 0f, 1f) clamp(it * 2f, 0f, 1f) } } /** * Sensor location for the: * - current physical display * - current screen resolution * - device's current orientation */ val udfpsSensorBounds: Flow<Rect> = udfpsOverlayInteractor.udfpsOverlayParams.map { it.sensorBounds }.distinctUntilChanged() /** /** * UDFPS icon location in pixels for the current display and screen resolution, in natural * UDFPS icon location in pixels for the current display and screen resolution, in natural * orientation. * orientation. Loading @@ -65,7 +75,7 @@ constructor( val iconLocation: Flow<IconLocation> = val iconLocation: Flow<IconLocation> = isSupported.flatMapLatest { supportsUI -> isSupported.flatMapLatest { supportsUI -> if (supportsUI) { if (supportsUI) { fingerprintPropertyInteractor.udfpsSensorBounds.map { bounds -> udfpsSensorBounds.map { bounds -> IconLocation( IconLocation( left = bounds.left, left = bounds.left, top = bounds.top, top = bounds.top, Loading packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/domain/interactor/FingerprintPropertyInteractorKosmos.kt +0 −1 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,5 @@ val Kosmos.fingerprintPropertyInteractor by Fixture { repository = fingerprintPropertyRepository, repository = fingerprintPropertyRepository, configurationInteractor = configurationInteractor, configurationInteractor = configurationInteractor, displayStateInteractor = displayStateInteractor, displayStateInteractor = displayStateInteractor, udfpsOverlayInteractor = udfpsOverlayInteractor, ) ) } } packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/binder/AlternateBouncerViewBinderKosmos.kt +0 −1 Original line number Original line Diff line number Diff line Loading @@ -75,7 +75,6 @@ private val Kosmos.alternateBouncerUdfpsIconViewModel by configurationInteractor = configurationInteractor, configurationInteractor = configurationInteractor, deviceEntryUdfpsInteractor = deviceEntryUdfpsInteractor, deviceEntryUdfpsInteractor = deviceEntryUdfpsInteractor, deviceEntryBackgroundViewModel = mock<DeviceEntryBackgroundViewModel>(), deviceEntryBackgroundViewModel = mock<DeviceEntryBackgroundViewModel>(), fingerprintPropertyInteractor = fingerprintPropertyInteractor, udfpsOverlayInteractor = udfpsOverlayInteractor, udfpsOverlayInteractor = udfpsOverlayInteractor, alternateBouncerViewModel = alternateBouncerViewModel, alternateBouncerViewModel = alternateBouncerViewModel, statusBarKeyguardViewManager = statusBarKeyguardViewManager, statusBarKeyguardViewManager = statusBarKeyguardViewManager, Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/FingerprintPropertyInteractor.kt +0 −10 Original line number Original line Diff line number Diff line Loading @@ -47,7 +47,6 @@ constructor( private val repository: FingerprintPropertyRepository, private val repository: FingerprintPropertyRepository, @Main private val configurationInteractor: ConfigurationInteractor, @Main private val configurationInteractor: ConfigurationInteractor, displayStateInteractor: DisplayStateInteractor, displayStateInteractor: DisplayStateInteractor, udfpsOverlayInteractor: UdfpsOverlayInteractor, ) { ) { val propertiesInitialized: Flow<Boolean> = repository.propertiesInitialized val propertiesInitialized: Flow<Boolean> = repository.propertiesInitialized val isUdfps: StateFlow<Boolean> = val isUdfps: StateFlow<Boolean> = Loading Loading @@ -118,15 +117,6 @@ constructor( ) ) } } /** * Sensor location for the: * - current physical display * - current screen resolution * - device's current orientation */ val udfpsSensorBounds: Flow<Rect> = udfpsOverlayInteractor.udfpsOverlayParams.map { it.sensorBounds }.distinctUntilChanged() companion object { companion object { private const val EMPTY_DISPLAY_ID = "" private const val EMPTY_DISPLAY_ID = "" Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerUdfpsIconViewModel.kt +12 −2 Original line number Original line Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.keyguard.ui.viewmodel package com.android.systemui.keyguard.ui.viewmodel import android.content.Context import android.content.Context import android.graphics.Rect import com.android.settingslib.Utils import com.android.settingslib.Utils import com.android.systemui.accessibility.domain.interactor.AccessibilityInteractor import com.android.systemui.accessibility.domain.interactor.AccessibilityInteractor import com.android.systemui.biometrics.domain.interactor.FingerprintPropertyInteractor import com.android.systemui.biometrics.domain.interactor.FingerprintPropertyInteractor Loading @@ -31,6 +32,7 @@ import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager import javax.inject.Inject import javax.inject.Inject import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.flowOf Loading @@ -45,7 +47,6 @@ constructor( @ShadeDisplayAware configurationInteractor: ConfigurationInteractor, @ShadeDisplayAware configurationInteractor: ConfigurationInteractor, deviceEntryUdfpsInteractor: DeviceEntryUdfpsInteractor, deviceEntryUdfpsInteractor: DeviceEntryUdfpsInteractor, deviceEntryBackgroundViewModel: DeviceEntryBackgroundViewModel, deviceEntryBackgroundViewModel: DeviceEntryBackgroundViewModel, fingerprintPropertyInteractor: FingerprintPropertyInteractor, udfpsOverlayInteractor: UdfpsOverlayInteractor, udfpsOverlayInteractor: UdfpsOverlayInteractor, alternateBouncerViewModel: AlternateBouncerViewModel, alternateBouncerViewModel: AlternateBouncerViewModel, private val statusBarKeyguardViewManager: StatusBarKeyguardViewManager, private val statusBarKeyguardViewManager: StatusBarKeyguardViewManager, Loading @@ -58,6 +59,15 @@ constructor( clamp(it * 2f, 0f, 1f) clamp(it * 2f, 0f, 1f) } } /** * Sensor location for the: * - current physical display * - current screen resolution * - device's current orientation */ val udfpsSensorBounds: Flow<Rect> = udfpsOverlayInteractor.udfpsOverlayParams.map { it.sensorBounds }.distinctUntilChanged() /** /** * UDFPS icon location in pixels for the current display and screen resolution, in natural * UDFPS icon location in pixels for the current display and screen resolution, in natural * orientation. * orientation. Loading @@ -65,7 +75,7 @@ constructor( val iconLocation: Flow<IconLocation> = val iconLocation: Flow<IconLocation> = isSupported.flatMapLatest { supportsUI -> isSupported.flatMapLatest { supportsUI -> if (supportsUI) { if (supportsUI) { fingerprintPropertyInteractor.udfpsSensorBounds.map { bounds -> udfpsSensorBounds.map { bounds -> IconLocation( IconLocation( left = bounds.left, left = bounds.left, top = bounds.top, top = bounds.top, Loading
packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/domain/interactor/FingerprintPropertyInteractorKosmos.kt +0 −1 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,5 @@ val Kosmos.fingerprintPropertyInteractor by Fixture { repository = fingerprintPropertyRepository, repository = fingerprintPropertyRepository, configurationInteractor = configurationInteractor, configurationInteractor = configurationInteractor, displayStateInteractor = displayStateInteractor, displayStateInteractor = displayStateInteractor, udfpsOverlayInteractor = udfpsOverlayInteractor, ) ) } }
packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/binder/AlternateBouncerViewBinderKosmos.kt +0 −1 Original line number Original line Diff line number Diff line Loading @@ -75,7 +75,6 @@ private val Kosmos.alternateBouncerUdfpsIconViewModel by configurationInteractor = configurationInteractor, configurationInteractor = configurationInteractor, deviceEntryUdfpsInteractor = deviceEntryUdfpsInteractor, deviceEntryUdfpsInteractor = deviceEntryUdfpsInteractor, deviceEntryBackgroundViewModel = mock<DeviceEntryBackgroundViewModel>(), deviceEntryBackgroundViewModel = mock<DeviceEntryBackgroundViewModel>(), fingerprintPropertyInteractor = fingerprintPropertyInteractor, udfpsOverlayInteractor = udfpsOverlayInteractor, udfpsOverlayInteractor = udfpsOverlayInteractor, alternateBouncerViewModel = alternateBouncerViewModel, alternateBouncerViewModel = alternateBouncerViewModel, statusBarKeyguardViewManager = statusBarKeyguardViewManager, statusBarKeyguardViewManager = statusBarKeyguardViewManager, Loading