Loading packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ constructor( @Application scope: CoroutineScope, ) { var receivedDownTouch = false val isVisible: Flow<Boolean> = bouncerRepository.alternateBouncerVisible val isVisible: StateFlow<Boolean> = bouncerRepository.alternateBouncerVisible private val alternateBouncerUiAvailableFromSource: HashSet<String> = HashSet() val alternateBouncerSupported: StateFlow<Boolean> = fingerprintPropertyRepository.sensorType Loading packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/OccludingAppDeviceEntryInteractor.kt +8 −15 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import com.android.systemui.plugins.ActivityStarter import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.res.R import com.android.systemui.util.kotlin.combine import com.android.systemui.util.kotlin.sample import javax.inject.Inject import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.Flow Loading Loading @@ -128,15 +127,9 @@ constructor( scope.launch { // On fingerprint success when the screen is on and not dreaming, go to the home // screen fingerprintUnlockSuccessEvents .sample( combine( powerInteractor.isInteractive, keyguardInteractor.isDreaming, ::Pair, ) ) .collect { (interactive, dreaming) -> fingerprintUnlockSuccessEvents.collect { val interactive = powerInteractor.isInteractive.value val dreaming = keyguardInteractor.isDreaming.value if (interactive && !dreaming) { goToHomeScreen() } Loading packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/SystemUIDeviceEntryFaceAuthInteractor.kt +5 −4 Original line number Diff line number Diff line Loading @@ -151,8 +151,8 @@ constructor( transitionFlows .merge() .filter { it.transitionState == TransitionState.STARTED } .sample(powerInteractor.detailedWakefulness) .filter { wakefulnessModel -> .filter { val wakefulnessModel = powerInteractor.detailedWakefulness.value val validWakeupReason = faceWakeUpTriggersConfig.shouldTriggerFaceAuthOnWakeUpFrom( wakefulnessModel.lastWakeReason Loading @@ -163,9 +163,10 @@ constructor( validWakeupReason } .onEach { faceAuthenticationLogger.lockscreenBecameVisible(it) val wakefulnessModel = powerInteractor.detailedWakefulness.value faceAuthenticationLogger.lockscreenBecameVisible(wakefulnessModel) FaceAuthUiEvent.FACE_AUTH_UPDATED_KEYGUARD_VISIBILITY_CHANGED.extraInfo = it.lastWakeReason.powerManagerWakeReason wakefulnessModel.lastWakeReason.powerManagerWakeReason runFaceAuth( FaceAuthUiEvent.FACE_AUTH_UPDATED_KEYGUARD_VISIBILITY_CHANGED, fallbackToDetect = true, Loading packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt +1 −6 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.power.shared.model.WakefulnessModel import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.util.kotlin.Utils.Companion.sample as sampleCombine import com.android.systemui.util.kotlin.sample import javax.inject.Inject import kotlin.time.Duration.Companion.milliseconds import kotlinx.coroutines.CoroutineDispatcher Loading Loading @@ -98,12 +97,8 @@ constructor( scope.launch { powerInteractor.isAwake .filterRelevantKeyguardStateAnd { isAwake -> isAwake } .sample(keyguardInteractor.biometricUnlockState, ::Pair) .collect { ( _, biometricUnlockState, ) -> val biometricUnlockState = keyguardInteractor.biometricUnlockState.value if (isWakeAndUnlock(biometricUnlockState.mode)) { if (SceneContainerFlag.isEnabled) { // TODO(b/360368320): Adapt for scene framework Loading packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt +11 −13 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ import com.android.systemui.power.shared.model.WakeSleepReason.FOLD import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.shade.data.repository.ShadeRepository import com.android.systemui.util.kotlin.sample import java.util.UUID import javax.inject.Inject import kotlin.time.Duration.Companion.milliseconds Loading Loading @@ -133,12 +132,11 @@ constructor( val invalidFromStates = setOf(KeyguardState.AOD, KeyguardState.DOZING) scope.launch("$TAG#listenForLockscreenToDreaming") { keyguardInteractor.isAbleToDream .filterRelevantKeyguardState() .sample(transitionInteractor.isFinishedIn(KeyguardState.LOCKSCREEN), ::Pair) .collect { (isAbleToDream, isOnLockscreen) -> val transitionInfo = internalTransitionInteractor.currentTransitionInfoInternal() keyguardInteractor.isAbleToDream.filterRelevantKeyguardState().collect { isAbleToDream -> val isOnLockscreen = transitionInteractor.finishedKeyguardState.value == KeyguardState.LOCKSCREEN val transitionInfo = internalTransitionInteractor.currentTransitionInfoInternal() val isTransitionInterruptible = transitionInfo.to == KeyguardState.LOCKSCREEN && !invalidFromStates.contains(transitionInfo.from) Loading Loading
packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ constructor( @Application scope: CoroutineScope, ) { var receivedDownTouch = false val isVisible: Flow<Boolean> = bouncerRepository.alternateBouncerVisible val isVisible: StateFlow<Boolean> = bouncerRepository.alternateBouncerVisible private val alternateBouncerUiAvailableFromSource: HashSet<String> = HashSet() val alternateBouncerSupported: StateFlow<Boolean> = fingerprintPropertyRepository.sensorType Loading
packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/OccludingAppDeviceEntryInteractor.kt +8 −15 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import com.android.systemui.plugins.ActivityStarter import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.res.R import com.android.systemui.util.kotlin.combine import com.android.systemui.util.kotlin.sample import javax.inject.Inject import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.Flow Loading Loading @@ -128,15 +127,9 @@ constructor( scope.launch { // On fingerprint success when the screen is on and not dreaming, go to the home // screen fingerprintUnlockSuccessEvents .sample( combine( powerInteractor.isInteractive, keyguardInteractor.isDreaming, ::Pair, ) ) .collect { (interactive, dreaming) -> fingerprintUnlockSuccessEvents.collect { val interactive = powerInteractor.isInteractive.value val dreaming = keyguardInteractor.isDreaming.value if (interactive && !dreaming) { goToHomeScreen() } Loading
packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/SystemUIDeviceEntryFaceAuthInteractor.kt +5 −4 Original line number Diff line number Diff line Loading @@ -151,8 +151,8 @@ constructor( transitionFlows .merge() .filter { it.transitionState == TransitionState.STARTED } .sample(powerInteractor.detailedWakefulness) .filter { wakefulnessModel -> .filter { val wakefulnessModel = powerInteractor.detailedWakefulness.value val validWakeupReason = faceWakeUpTriggersConfig.shouldTriggerFaceAuthOnWakeUpFrom( wakefulnessModel.lastWakeReason Loading @@ -163,9 +163,10 @@ constructor( validWakeupReason } .onEach { faceAuthenticationLogger.lockscreenBecameVisible(it) val wakefulnessModel = powerInteractor.detailedWakefulness.value faceAuthenticationLogger.lockscreenBecameVisible(wakefulnessModel) FaceAuthUiEvent.FACE_AUTH_UPDATED_KEYGUARD_VISIBILITY_CHANGED.extraInfo = it.lastWakeReason.powerManagerWakeReason wakefulnessModel.lastWakeReason.powerManagerWakeReason runFaceAuth( FaceAuthUiEvent.FACE_AUTH_UPDATED_KEYGUARD_VISIBILITY_CHANGED, fallbackToDetect = true, Loading
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt +1 −6 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.power.shared.model.WakefulnessModel import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.util.kotlin.Utils.Companion.sample as sampleCombine import com.android.systemui.util.kotlin.sample import javax.inject.Inject import kotlin.time.Duration.Companion.milliseconds import kotlinx.coroutines.CoroutineDispatcher Loading Loading @@ -98,12 +97,8 @@ constructor( scope.launch { powerInteractor.isAwake .filterRelevantKeyguardStateAnd { isAwake -> isAwake } .sample(keyguardInteractor.biometricUnlockState, ::Pair) .collect { ( _, biometricUnlockState, ) -> val biometricUnlockState = keyguardInteractor.biometricUnlockState.value if (isWakeAndUnlock(biometricUnlockState.mode)) { if (SceneContainerFlag.isEnabled) { // TODO(b/360368320): Adapt for scene framework Loading
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt +11 −13 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ import com.android.systemui.power.shared.model.WakeSleepReason.FOLD import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.shade.data.repository.ShadeRepository import com.android.systemui.util.kotlin.sample import java.util.UUID import javax.inject.Inject import kotlin.time.Duration.Companion.milliseconds Loading Loading @@ -133,12 +132,11 @@ constructor( val invalidFromStates = setOf(KeyguardState.AOD, KeyguardState.DOZING) scope.launch("$TAG#listenForLockscreenToDreaming") { keyguardInteractor.isAbleToDream .filterRelevantKeyguardState() .sample(transitionInteractor.isFinishedIn(KeyguardState.LOCKSCREEN), ::Pair) .collect { (isAbleToDream, isOnLockscreen) -> val transitionInfo = internalTransitionInteractor.currentTransitionInfoInternal() keyguardInteractor.isAbleToDream.filterRelevantKeyguardState().collect { isAbleToDream -> val isOnLockscreen = transitionInteractor.finishedKeyguardState.value == KeyguardState.LOCKSCREEN val transitionInfo = internalTransitionInteractor.currentTransitionInfoInternal() val isTransitionInterruptible = transitionInfo.to == KeyguardState.LOCKSCREEN && !invalidFromStates.contains(transitionInfo.from) Loading