Loading packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/EditTileListStateTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ class EditTileListStateTest : SysuiTestCase() { tileSpec = TileSpec.create(tileSpec), icon = Icon.Resource(0, null), label = AnnotatedString("unused"), inlinedLabel = null, appName = null, isCurrent = true, isDualTarget = false, Loading packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/infinitegrid/EditTile.kt +3 −2 Original line number Diff line number Diff line Loading @@ -1009,9 +1009,10 @@ private fun AvailableTileGridCell( ) } Box(Modifier.fillMaxSize()) { val inlinedLabel = cell.inlinedLabel val icon = cell.appIcon if (icon != null && icon is Icon.Loaded) { AppIconText(icon, cell.label, colors.label) if (inlinedLabel != null && icon != null && icon is Icon.Loaded) { AppIconText(icon, inlinedLabel, colors.label) } else { Text( cell.label.text, Loading packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/EditTileViewModel.kt +22 −2 Original line number Diff line number Diff line Loading @@ -56,12 +56,13 @@ data class UnloadedEditTileViewModel( append(loadedLabel) } } else { loadedLabel null } return EditTileViewModel( tileSpec = tileSpec, icon = icon, label = inlinedLabel, label = loadedLabel, inlinedLabel = inlinedLabel, appName = appName?.toAnnotatedString(context), appIcon = appIcon, isCurrent = isCurrent, Loading @@ -72,11 +73,30 @@ data class UnloadedEditTileViewModel( } } /** * Viewmodel for a loaded tile within Quick Settings edit mode. * * This represents a tile that has been loaded with localized resources and is ready to be displayed * in the UI. * * @property tileSpec The [TileSpec] for this tile. * @property icon The icon for the tile. * @property label The main label for the tile. * @property inlinedLabel An optional [AnnotatedString] with an inlined app icon. * @property appName The name of the associated app, if applicable. * @property appIcon The icon of the associated app, if applicable. * @property isCurrent True if the tile is in the user's active set of tiles, false otherwise. * @property isDualTarget True if the tile supports dual-target clicks, false otherwise. * @property availableEditActions A set of [AvailableEditActions] that can be performed on this tile * in edit mode. * @property category The [TileCategory] the tile belongs to. */ @Immutable data class EditTileViewModel( val tileSpec: TileSpec, val icon: Icon, val label: AnnotatedString, val inlinedLabel: AnnotatedString?, val appName: AnnotatedString?, val appIcon: Icon?, val isCurrent: Boolean, Loading packages/SystemUI/tests/src/com/android/systemui/qs/panels/ui/compose/DragAndDropTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ class DragAndDropTest : SysuiTestCase() { icon = Icon.Resource(android.R.drawable.star_on, ContentDescription.Loaded(tileSpec)), label = AnnotatedString(tileSpec), inlinedLabel = null, appName = null, isCurrent = true, isDualTarget = false, Loading packages/SystemUI/tests/src/com/android/systemui/qs/panels/ui/compose/EditModeTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,7 @@ class EditModeTest : SysuiTestCase() { icon = Icon.Resource(android.R.drawable.star_on, ContentDescription.Loaded(tileSpec)), label = AnnotatedString(tileSpec), inlinedLabel = null, appName = null, isCurrent = isCurrent, isDualTarget = false, Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/EditTileListStateTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ class EditTileListStateTest : SysuiTestCase() { tileSpec = TileSpec.create(tileSpec), icon = Icon.Resource(0, null), label = AnnotatedString("unused"), inlinedLabel = null, appName = null, isCurrent = true, isDualTarget = false, Loading
packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/infinitegrid/EditTile.kt +3 −2 Original line number Diff line number Diff line Loading @@ -1009,9 +1009,10 @@ private fun AvailableTileGridCell( ) } Box(Modifier.fillMaxSize()) { val inlinedLabel = cell.inlinedLabel val icon = cell.appIcon if (icon != null && icon is Icon.Loaded) { AppIconText(icon, cell.label, colors.label) if (inlinedLabel != null && icon != null && icon is Icon.Loaded) { AppIconText(icon, inlinedLabel, colors.label) } else { Text( cell.label.text, Loading
packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/EditTileViewModel.kt +22 −2 Original line number Diff line number Diff line Loading @@ -56,12 +56,13 @@ data class UnloadedEditTileViewModel( append(loadedLabel) } } else { loadedLabel null } return EditTileViewModel( tileSpec = tileSpec, icon = icon, label = inlinedLabel, label = loadedLabel, inlinedLabel = inlinedLabel, appName = appName?.toAnnotatedString(context), appIcon = appIcon, isCurrent = isCurrent, Loading @@ -72,11 +73,30 @@ data class UnloadedEditTileViewModel( } } /** * Viewmodel for a loaded tile within Quick Settings edit mode. * * This represents a tile that has been loaded with localized resources and is ready to be displayed * in the UI. * * @property tileSpec The [TileSpec] for this tile. * @property icon The icon for the tile. * @property label The main label for the tile. * @property inlinedLabel An optional [AnnotatedString] with an inlined app icon. * @property appName The name of the associated app, if applicable. * @property appIcon The icon of the associated app, if applicable. * @property isCurrent True if the tile is in the user's active set of tiles, false otherwise. * @property isDualTarget True if the tile supports dual-target clicks, false otherwise. * @property availableEditActions A set of [AvailableEditActions] that can be performed on this tile * in edit mode. * @property category The [TileCategory] the tile belongs to. */ @Immutable data class EditTileViewModel( val tileSpec: TileSpec, val icon: Icon, val label: AnnotatedString, val inlinedLabel: AnnotatedString?, val appName: AnnotatedString?, val appIcon: Icon?, val isCurrent: Boolean, Loading
packages/SystemUI/tests/src/com/android/systemui/qs/panels/ui/compose/DragAndDropTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ class DragAndDropTest : SysuiTestCase() { icon = Icon.Resource(android.R.drawable.star_on, ContentDescription.Loaded(tileSpec)), label = AnnotatedString(tileSpec), inlinedLabel = null, appName = null, isCurrent = true, isDualTarget = false, Loading
packages/SystemUI/tests/src/com/android/systemui/qs/panels/ui/compose/EditModeTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,7 @@ class EditModeTest : SysuiTestCase() { icon = Icon.Resource(android.R.drawable.star_on, ContentDescription.Loaded(tileSpec)), label = AnnotatedString(tileSpec), inlinedLabel = null, appName = null, isCurrent = isCurrent, isDualTarget = false, Loading