diff options
author | George Lin <giolin@google.com> | 2023-11-16 20:28:00 +0000 |
---|---|---|
committer | George Lin <giolin@google.com> | 2023-11-16 20:43:31 +0000 |
commit | 65c5beaa2805a68d99218208e9212e439d381234 (patch) | |
tree | 804dfab6b692c94cf7d0be684fc4952ed3c77ab1 /src/com | |
parent | 6946513aa86a03cd47cc1ca7a89dc88c4a9a355d (diff) | |
download | ThemePicker-65c5beaa2805a68d99218208e9212e439d381234.tar.gz |
Fix stale state of the shortcut slot tab a11y content description
This is due to that we don't assign a none string when there's no
affordaces selected.
Test: Manually tested that it annouces none when none is selected
Bug: 280551132
Flag: None
Change-Id: Ic474c8ff6941efb4ab24aa507e9e77de360d2ba7
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/customization/picker/quickaffordance/ui/adapter/SlotTabAdapter.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/customization/picker/quickaffordance/ui/adapter/SlotTabAdapter.kt b/src/com/android/customization/picker/quickaffordance/ui/adapter/SlotTabAdapter.kt index 8891b03f..0e3b7167 100644 --- a/src/com/android/customization/picker/quickaffordance/ui/adapter/SlotTabAdapter.kt +++ b/src/com/android/customization/picker/quickaffordance/ui/adapter/SlotTabAdapter.kt @@ -67,7 +67,9 @@ class SlotTabAdapter : RecyclerView.Adapter<SlotTabAdapter.ViewHolder>() { .find { it.isSelected.value } ?.text ?.asString(holder.itemView.context) - stateDescription?.let { holder.itemView.stateDescription = it } + holder.itemView.stateDescription = + stateDescription + ?: holder.itemView.resources.getString(R.string.keyguard_affordance_none) } class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { |