Loading packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt +14 −1 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.merge import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.onStart import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.flow.transform Loading Loading @@ -318,8 +319,13 @@ constructor( SecureCameraRelatedEventType.InGoneState -> false } } .onStart { emit(false) } .distinctUntilChanged() .onEach { Log.v(TAG, "isSecureCameraActive: $it") } .stateIn( scope = applicationScope, started = SharingStarted.WhileSubscribed(), initialValue = false, ) /** The approximate location on the screen of the fingerprint sensor, if one is available. */ val fingerprintSensorLocation: Flow<Point?> = repository.fingerprintSensorLocation Loading Loading @@ -547,6 +553,13 @@ constructor( initialValue = isDozing.value, ) .collect() isSecureCameraActive .logDiffsForTable( tableLogBuffer = tableLogBuffer, columnName = "isSecureCameraActive", initialValue = false, ) .collect() } companion object { Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/HomeStatusBarViewModel.kt +24 −8 Original line number Diff line number Diff line Loading @@ -291,7 +291,15 @@ constructor( // Keep the status bar visible while the shade is just starting to open, but otherwise // hide it so that the status bar doesn't draw while it can't be seen. // See b/394257529#comment24. shadeInteractor.anyExpansion.map { it >= 0.2 }.distinctUntilChanged() shadeInteractor.anyExpansion .map { it >= 0.2 } .distinctUntilChanged() .logDiffsForTable( tableLogBuffer = tableLogger, columnName = COL_SHADE_EXPANDED_ENOUGH, initialValue = false, ) .stateIn(bgScope, SharingStarted.WhileSubscribed(), initialValue = false) /** * Whether the display of this statusbar has the shade window (that is hosting shade container Loading Loading @@ -399,8 +407,14 @@ constructor( isShadeVisibleOnThisDisplay -> (currentKeyguardState == GONE || currentKeyguardState == OCCLUDED) && !isShadeVisibleOnThisDisplay // TODO(b/364360986): Add edge cases, like secure camera launch. } .distinctUntilChanged() .logDiffsForTable( tableLogBuffer = tableLogger, columnName = COL_ALLOWED_LEGACY, initialValue = false, ) .stateIn(bgScope, SharingStarted.WhileSubscribed(), initialValue = false) // "Compat" to cover both legacy and Scene container case in one flow. private val isHomeStatusBarAllowedCompat = Loading Loading @@ -444,7 +458,7 @@ constructor( columnName = COL_VISIBLE, initialValue = false, ) .flowOn(bgDispatcher) .stateIn(bgScope, SharingStarted.WhileSubscribed(), initialValue = false) /** * True if we need to hide the usual start side content in order to show the heads up Loading Loading @@ -640,7 +654,9 @@ constructor( companion object { private const val COL_LOCK_TO_OCCLUDED = "Lock->Occluded" private const val COL_ALLOWED_LEGACY = "allowedLegacy" private const val COL_ALLOWED_BY_SCENE = "allowedByScene" private const val COL_SHADE_EXPANDED_ENOUGH = "shadeExpandedEnough" private const val COL_NOTIF_LIGHTS_OUT = "notifLightsOut" private const val COL_SHOW_OPERATOR_NAME = "showOperatorName" private const val COL_VISIBLE = "visible" Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt +14 −1 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.merge import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.onStart import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.flow.transform Loading Loading @@ -318,8 +319,13 @@ constructor( SecureCameraRelatedEventType.InGoneState -> false } } .onStart { emit(false) } .distinctUntilChanged() .onEach { Log.v(TAG, "isSecureCameraActive: $it") } .stateIn( scope = applicationScope, started = SharingStarted.WhileSubscribed(), initialValue = false, ) /** The approximate location on the screen of the fingerprint sensor, if one is available. */ val fingerprintSensorLocation: Flow<Point?> = repository.fingerprintSensorLocation Loading Loading @@ -547,6 +553,13 @@ constructor( initialValue = isDozing.value, ) .collect() isSecureCameraActive .logDiffsForTable( tableLogBuffer = tableLogBuffer, columnName = "isSecureCameraActive", initialValue = false, ) .collect() } companion object { Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/HomeStatusBarViewModel.kt +24 −8 Original line number Diff line number Diff line Loading @@ -291,7 +291,15 @@ constructor( // Keep the status bar visible while the shade is just starting to open, but otherwise // hide it so that the status bar doesn't draw while it can't be seen. // See b/394257529#comment24. shadeInteractor.anyExpansion.map { it >= 0.2 }.distinctUntilChanged() shadeInteractor.anyExpansion .map { it >= 0.2 } .distinctUntilChanged() .logDiffsForTable( tableLogBuffer = tableLogger, columnName = COL_SHADE_EXPANDED_ENOUGH, initialValue = false, ) .stateIn(bgScope, SharingStarted.WhileSubscribed(), initialValue = false) /** * Whether the display of this statusbar has the shade window (that is hosting shade container Loading Loading @@ -399,8 +407,14 @@ constructor( isShadeVisibleOnThisDisplay -> (currentKeyguardState == GONE || currentKeyguardState == OCCLUDED) && !isShadeVisibleOnThisDisplay // TODO(b/364360986): Add edge cases, like secure camera launch. } .distinctUntilChanged() .logDiffsForTable( tableLogBuffer = tableLogger, columnName = COL_ALLOWED_LEGACY, initialValue = false, ) .stateIn(bgScope, SharingStarted.WhileSubscribed(), initialValue = false) // "Compat" to cover both legacy and Scene container case in one flow. private val isHomeStatusBarAllowedCompat = Loading Loading @@ -444,7 +458,7 @@ constructor( columnName = COL_VISIBLE, initialValue = false, ) .flowOn(bgDispatcher) .stateIn(bgScope, SharingStarted.WhileSubscribed(), initialValue = false) /** * True if we need to hide the usual start side content in order to show the heads up Loading Loading @@ -640,7 +654,9 @@ constructor( companion object { private const val COL_LOCK_TO_OCCLUDED = "Lock->Occluded" private const val COL_ALLOWED_LEGACY = "allowedLegacy" private const val COL_ALLOWED_BY_SCENE = "allowedByScene" private const val COL_SHADE_EXPANDED_ENOUGH = "shadeExpandedEnough" private const val COL_NOTIF_LIGHTS_OUT = "notifLightsOut" private const val COL_SHOW_OPERATOR_NAME = "showOperatorName" private const val COL_VISIBLE = "visible" Loading