diff options
author | 2024-09-02 13:31:17 +0000 | |
---|---|---|
committer | 2024-09-03 13:08:46 +0000 | |
commit | 2f383802db1eedfbd462091a5d4406741562acbb (patch) | |
tree | 01e49be3e1a5ecf414fae2e8c8746707c90f152e | |
parent | ad0e7a642cbe97b2baa4b02262b876a6cb0a6b2a (diff) |
[flexiglass] Refactor destinationScenes->userActions + extract interface
Bug: 359173565
Bug: 356596436
Bug: 363206563
Flag: com.android.systemui.scene_container
Test: Existing unit tests still pass.
Change-Id: I87b462e12c7533d5582ecefb62d4438cb8ce8a7a
21 files changed, 101 insertions, 67 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt index 60295cba6d85..7fb88e8d1fcc 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt @@ -64,8 +64,7 @@ constructor( actionsViewModelFactory.create() } - override val destinationScenes: Flow<Map<UserAction, UserActionResult>> = - actionsViewModel.actions + override val userActions: Flow<Map<UserAction, UserActionResult>> = actionsViewModel.actions override suspend fun onActivated(): Nothing { actionsViewModel.activate() diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalScene.kt index f658169a24ff..8b6de6ab22f3 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalScene.kt @@ -49,10 +49,10 @@ constructor( ) : ExclusiveActivatable(), Scene { override val key = Scenes.Communal - override val destinationScenes: Flow<Map<UserAction, UserActionResult>> = - MutableStateFlow<Map<UserAction, UserActionResult>>( + override val userActions: Flow<Map<UserAction, UserActionResult>> = + MutableStateFlow( mapOf( - Swipe(SwipeDirection.End) to UserActionResult(Scenes.Lockscreen), + Swipe(SwipeDirection.End) to Scenes.Lockscreen, ) ) .asStateFlow() diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt index b1c0f4ec03d2..c7c29f9fdb7c 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt @@ -47,8 +47,7 @@ constructor( actionsViewModelFactory.create() } - override val destinationScenes: Flow<Map<UserAction, UserActionResult>> = - actionsViewModel.actions + override val userActions: Flow<Map<UserAction, UserActionResult>> = actionsViewModel.actions override suspend fun onActivated(): Nothing { actionsViewModel.activate() diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/NotificationsShadeOverlay.kt b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/NotificationsShadeOverlay.kt index e4c611ee0eb2..a22beccf3448 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/NotificationsShadeOverlay.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/NotificationsShadeOverlay.kt @@ -23,6 +23,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import com.android.compose.animation.scene.ContentScope +import com.android.compose.animation.scene.UserAction +import com.android.compose.animation.scene.UserActionResult import com.android.systemui.battery.BatteryMeterViewController import com.android.systemui.dagger.SysUISingleton import com.android.systemui.lifecycle.rememberViewModel @@ -39,6 +41,7 @@ import com.android.systemui.statusbar.phone.ui.StatusBarIconController import com.android.systemui.statusbar.phone.ui.TintedIconManager import dagger.Lazy import javax.inject.Inject +import kotlinx.coroutines.flow.Flow @SysUISingleton class NotificationsShadeOverlay @@ -59,6 +62,8 @@ constructor( actionsViewModelFactory.create() } + override val userActions: Flow<Map<UserAction, UserActionResult>> = actionsViewModel.actions + override suspend fun activate(): Nothing { actionsViewModel.activate() } diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/NotificationsShadeScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/NotificationsShadeScene.kt index 43761c33f41d..1f4cd0473086 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/NotificationsShadeScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/NotificationsShadeScene.kt @@ -65,8 +65,7 @@ constructor( actionsViewModelFactory.create() } - override val destinationScenes: Flow<Map<UserAction, UserActionResult>> = - actionsViewModel.actions + override val userActions: Flow<Map<UserAction, UserActionResult>> = actionsViewModel.actions override suspend fun onActivated(): Nothing { actionsViewModel.activate() diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt index 8be3ecd37762..d34295ea1d22 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt @@ -139,8 +139,7 @@ constructor( actionsViewModelFactory.create() } - override val destinationScenes: Flow<Map<UserAction, UserActionResult>> = - actionsViewModel.actions + override val userActions: Flow<Map<UserAction, UserActionResult>> = actionsViewModel.actions override suspend fun onActivated(): Nothing { actionsViewModel.activate() diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsShadeOverlay.kt b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsShadeOverlay.kt index 988c712b7980..f8d0588c9ae6 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsShadeOverlay.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsShadeOverlay.kt @@ -34,6 +34,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.android.compose.animation.scene.ContentScope +import com.android.compose.animation.scene.UserAction +import com.android.compose.animation.scene.UserActionResult import com.android.systemui.battery.BatteryMeterViewController import com.android.systemui.brightness.ui.compose.BrightnessSliderContainer import com.android.systemui.compose.modifiers.sysuiResTag @@ -51,6 +53,7 @@ import com.android.systemui.shade.ui.composable.OverlayShade import com.android.systemui.statusbar.phone.ui.StatusBarIconController import com.android.systemui.statusbar.phone.ui.TintedIconManager import javax.inject.Inject +import kotlinx.coroutines.flow.Flow @SysUISingleton class QuickSettingsShadeOverlay @@ -69,6 +72,8 @@ constructor( actionsViewModelFactory.create() } + override val userActions: Flow<Map<UserAction, UserActionResult>> = actionsViewModel.actions + override suspend fun activate(): Nothing { actionsViewModel.activate() } diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsShadeScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsShadeScene.kt index 4869ca3f862f..e27c7e29ba50 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsShadeScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsShadeScene.kt @@ -57,8 +57,7 @@ constructor( actionsViewModelFactory.create() } - override val destinationScenes: Flow<Map<UserAction, UserActionResult>> = - actionsViewModel.actions + override val userActions: Flow<Map<UserAction, UserActionResult>> = actionsViewModel.actions override suspend fun onActivated(): Nothing { actionsViewModel.activate() diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/ActionableContent.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/ActionableContent.kt new file mode 100644 index 000000000000..8fe6893cb352 --- /dev/null +++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/ActionableContent.kt @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.scene.ui.composable + +import com.android.compose.animation.scene.UserAction +import com.android.compose.animation.scene.UserActionResult +import kotlinx.coroutines.flow.Flow + +/** Defines interface for content that can respond to user-actions. */ +interface ActionableContent { + /** + * The mapping between [UserAction] and destination [UserActionResult]s. + * + * When the scene framework detects a user action, if the current scene has a map entry for that + * user action, the framework starts a transition to the content specified in the map. + * + * Once the content is shown, the scene framework will read this property and set up a collector + * to watch for new mapping values. For each map entry, the scene framework will set up user + * input handling for its [UserAction] and, if such a user action is detected, initiate a + * transition to the specified [UserActionResult]. + * + * Note that reading from this method does _not_ mean that any user action has occurred. + * Instead, the property is read before any user action/gesture is detected so that the + * framework can decide whether to set up gesture/input detectors/listeners in case user actions + * of the given types ever occur. + * + * A missing value for a specific [UserAction] means that the user action of the given type is + * not currently active in the top-most content (in z-index order) and should be ignored by the + * framework until the top-most content changes. + */ + val userActions: Flow<Map<UserAction, UserActionResult>> +} diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt index 0d61f580d728..ae5dd8abb82e 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt @@ -56,8 +56,7 @@ constructor( private val actionsViewModel: GoneUserActionsViewModel by lazy { viewModelFactory.create() } - override val destinationScenes: Flow<Map<UserAction, UserActionResult>> = - actionsViewModel.actions + override val userActions: Flow<Map<UserAction, UserActionResult>> = actionsViewModel.actions override suspend fun onActivated(): Nothing { actionsViewModel.activate() diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/Overlay.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/Overlay.kt index d62befd10745..609ce90fd684 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/Overlay.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/Overlay.kt @@ -18,9 +18,14 @@ package com.android.systemui.scene.ui.composable import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import com.android.compose.animation.scene.Back import com.android.compose.animation.scene.ContentScope import com.android.compose.animation.scene.OverlayKey +import com.android.compose.animation.scene.UserAction +import com.android.compose.animation.scene.UserActionResult import com.android.systemui.lifecycle.Activatable +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.flowOf /** * Defines interface for classes that can describe an "overlay". @@ -29,9 +34,17 @@ import com.android.systemui.lifecycle.Activatable * container takes care of rendering any current overlays and allowing overlays to be shown, hidden, * or replaced based on a user action. */ -interface Overlay : Activatable { +interface Overlay : Activatable, ActionableContent { /** Uniquely-identifying key for this overlay. The key must be unique within its container. */ val key: OverlayKey + /** + * The user actions supported by this overlay. + * + * @see [ActionableContent.userActions] + */ + override val userActions: Flow<Map<UserAction, UserActionResult>> + get() = flowOf(mapOf(Back to UserActionResult.HideOverlay(key))) + @Composable fun ContentScope.Content(modifier: Modifier) } diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/Scene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/Scene.kt index 5319ec345d00..8d8ab8ee7949 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/Scene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/Scene.kt @@ -20,10 +20,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import com.android.compose.animation.scene.SceneKey import com.android.compose.animation.scene.SceneScope -import com.android.compose.animation.scene.UserAction -import com.android.compose.animation.scene.UserActionResult import com.android.systemui.lifecycle.Activatable -import kotlinx.coroutines.flow.Flow /** * Defines interface for classes that can describe a "scene". @@ -33,32 +30,10 @@ import kotlinx.coroutines.flow.Flow * based on either user action (for example, swiping down while on the lock screen scene may switch * to the shade scene). */ -interface Scene : Activatable { +interface Scene : Activatable, ActionableContent { /** Uniquely-identifying key for this scene. The key must be unique within its container. */ val key: SceneKey - /** - * The mapping between [UserAction] and destination [UserActionResult]s. - * - * When the scene framework detects a user action, if the current scene has a map entry for that - * user action, the framework starts a transition to the scene in the map. - * - * Once the [Scene] becomes the current one, the scene framework will read this property and set - * up a collector to watch for new mapping values. If every map entry provided by the scene, the - * framework will set up user input handling for its [UserAction] and, if such a user action is - * detected, initiate a transition to the specified [UserActionResult]. - * - * Note that reading from this method does _not_ mean that any user action has occurred. - * Instead, the property is read before any user action/gesture is detected so that the - * framework can decide whether to set up gesture/input detectors/listeners in case user actions - * of the given types ever occur. - * - * Note that a missing value for a specific [UserAction] means that the user action of the given - * type is not currently active in the scene and should be ignored by the framework, while the - * current scene is this one. - */ - val destinationScenes: Flow<Map<UserAction, UserActionResult>> - @Composable fun SceneScope.Content(modifier: Modifier) } diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt index 851fa3ff005e..a7e41ce05f58 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt @@ -104,7 +104,7 @@ fun SceneContainer( // TODO(b/359173565): Add overlay user actions when the API is final. LaunchedEffect(currentSceneKey) { try { - sceneByKey[currentSceneKey]?.destinationScenes?.collectLatest { userActions -> + sceneByKey[currentSceneKey]?.userActions?.collectLatest { userActions -> userActionsByContentKey[currentSceneKey] = viewModel.resolveSceneFamilies(userActions) } diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt index 00a1226314f3..a03bf43c4c8f 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt @@ -175,8 +175,7 @@ constructor( actionsViewModel.activate() } - override val destinationScenes: Flow<Map<UserAction, UserActionResult>> = - actionsViewModel.actions + override val userActions: Flow<Map<UserAction, UserActionResult>> = actionsViewModel.actions @Composable override fun SceneScope.Content( diff --git a/packages/SystemUI/docs/scene.md b/packages/SystemUI/docs/scene.md index a7740c677d51..0ac15c583b29 100644 --- a/packages/SystemUI/docs/scene.md +++ b/packages/SystemUI/docs/scene.md @@ -124,8 +124,8 @@ Each scene is defined as an implementation of the [`Scene`](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/Scene.kt) interface, which has three parts: 1. The `key` property returns the [`SceneKey`](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneKey.kt) -that uniquely identifies that scene 2. The `destinationScenes` `Flow` returns -the (potentially ever-changing) set of navigation edges to other scenes, based +that uniquely identifies that scene 2. The `userActions` `Flow` returns +the (potentially ever-changing) set of navigation edges to other content, based on user-actions, which is how the navigation graph is defined (see [the Scene navigation](#Scene-navigation) section for more) 3. The `Content` function which uses @@ -141,7 +141,7 @@ For example: @SysUISingleton class YourScene @Inject constructor( /* your dependencies here */ ) : Scene { override val key = SceneKey.YourScene - override val destinationScenes: StateFlow<Map<UserAction, SceneModel>> = + override val userActions: StateFlow<Map<UserAction, SceneModel>> = MutableStateFlow<Map<UserAction, SceneModel>>( mapOf( // This is where scene navigation is defined, more on that below. diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenUserActionsViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenUserActionsViewModelTest.kt index e2110db3e9cf..4253c29d241c 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenUserActionsViewModelTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenUserActionsViewModelTest.kt @@ -170,7 +170,7 @@ class LockscreenUserActionsViewModelTest : SysuiTestCase() { @Test @EnableFlags(Flags.FLAG_COMMUNAL_HUB) - fun destinationScenes() = + fun userActions() = testScope.runTest { underTest.activateIn(this) kosmos.fakeDeviceEntryRepository.setLockscreenEnabled(true) @@ -193,9 +193,9 @@ class LockscreenUserActionsViewModelTest : SysuiTestCase() { }, ) - val destinationScenes by collectLastValue(underTest.actions) + val userActions by collectLastValue(underTest.actions) val downDestination = - destinationScenes?.get( + userActions?.get( Swipe( SwipeDirection.Down, fromSource = Edge.Top.takeIf { downFromEdge }, @@ -227,11 +227,10 @@ class LockscreenUserActionsViewModelTest : SysuiTestCase() { val upScene by collectLastValue( - (destinationScenes?.get(Swipe(SwipeDirection.Up)) - as? UserActionResult.ChangeScene) - ?.toScene - ?.let { scene -> kosmos.sceneInteractor.resolveSceneFamily(scene) } - ?: flowOf(null) + (userActions?.get(Swipe.Up) as? UserActionResult.ChangeScene)?.toScene?.let { + scene -> + kosmos.sceneInteractor.resolveSceneFamily(scene) + } ?: flowOf(null) ) assertThat(upScene) @@ -244,11 +243,10 @@ class LockscreenUserActionsViewModelTest : SysuiTestCase() { val leftScene by collectLastValue( - (destinationScenes?.get(Swipe(SwipeDirection.Left)) - as? UserActionResult.ChangeScene) - ?.toScene - ?.let { scene -> kosmos.sceneInteractor.resolveSceneFamily(scene) } - ?: flowOf(null) + (userActions?.get(Swipe.Left) as? UserActionResult.ChangeScene)?.toScene?.let { + scene -> + kosmos.sceneInteractor.resolveSceneFamily(scene) + } ?: flowOf(null) ) assertThat(leftScene) diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/GoneUserActionsViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/GoneUserActionsViewModelTest.kt index 4b391ecde47a..03106eca1f63 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/GoneUserActionsViewModelTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/GoneUserActionsViewModelTest.kt @@ -62,21 +62,21 @@ class GoneUserActionsViewModelTest : SysuiTestCase() { @Test fun downTransitionKey_splitShadeEnabled_isGoneToSplitShade() = testScope.runTest { - val destinationScenes by collectLastValue(underTest.actions) + val userActions by collectLastValue(underTest.actions) shadeRepository.setShadeLayoutWide(true) runCurrent() - assertThat(destinationScenes?.get(Swipe(SwipeDirection.Down))?.transitionKey) + assertThat(userActions?.get(Swipe(SwipeDirection.Down))?.transitionKey) .isEqualTo(ToSplitShade) } @Test fun downTransitionKey_splitShadeDisabled_isNull() = testScope.runTest { - val destinationScenes by collectLastValue(underTest.actions) + val userActions by collectLastValue(underTest.actions) shadeRepository.setShadeLayoutWide(false) runCurrent() - assertThat(destinationScenes?.get(Swipe(SwipeDirection.Down))?.transitionKey).isNull() + assertThat(userActions?.get(Swipe(SwipeDirection.Down))?.transitionKey).isNull() } } diff --git a/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/UserActionsViewModel.kt b/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/UserActionsViewModel.kt index 3cde13a97808..57628d0f3f40 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/UserActionsViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/UserActionsViewModel.kt @@ -25,8 +25,7 @@ import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow /** - * Base class for view-models that need to keep a map of user actions (also known as "destination - * scenes") up-to-date. + * Base class for view-models that need to keep a map of user actions up-to-date. * * Subclasses need only to override [hydrateActions], suspending forever if they need; they don't * need to worry about resetting the value of [actions] when the view-model is deactivated/canceled, diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsShadeSceneActionsViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsShadeUserActionsViewModelKosmos.kt index 06592b1ea3ed..06592b1ea3ed 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsShadeSceneActionsViewModelKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsShadeUserActionsViewModelKosmos.kt diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/ui/viewmodel/NotificationsShadeSceneActionsViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/ui/viewmodel/NotificationsShadeUserActionsViewModelKosmos.kt index 6345c4076412..6345c4076412 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/ui/viewmodel/NotificationsShadeSceneActionsViewModelKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/ui/viewmodel/NotificationsShadeUserActionsViewModelKosmos.kt diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneActionsViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/ui/viewmodel/ShadeUserActionsViewModelKosmos.kt index 48c5121c71c1..48c5121c71c1 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneActionsViewModelKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/ui/viewmodel/ShadeUserActionsViewModelKosmos.kt |