summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
index 71fc01717baa..c7157da26ea3 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
@@ -293,8 +293,13 @@ class ControlsUiControllerImpl @Inject constructor (
* for this dialog. Use a textView with the ListPopupWindow to achieve
* a similar effect
*/
+ val item = adapter.findSelectionItem(selectedStructure) ?: adapter.getItem(0)
parent.requireViewById<TextView>(R.id.app_or_structure_spinner).apply {
- setText((adapter.findSelectionItem(selectedStructure) ?: adapter.getItem(0)).getTitle())
+ setText(item.getTitle())
+ }
+ parent.requireViewById<ImageView>(R.id.app_icon).apply {
+ setContentDescription(item.getTitle())
+ setImageDrawable(item.icon)
}
val anchor = parent.requireViewById<ViewGroup>(R.id.controls_header)
anchor.setOnClickListener(object : View.OnClickListener {
@@ -330,11 +335,6 @@ class ControlsUiControllerImpl @Inject constructor (
}
}
})
-
- parent.requireViewById<ImageView>(R.id.app_icon).apply {
- setContentDescription("My Home")
- setImageDrawable(items[0].icon)
- }
}
private fun loadPreference(structures: List<StructureInfo>): StructureInfo {