commit | ee17d9a1901209e6d8626b2b27ce06995350ba22 | [log] [tgz] |
---|---|---|
author | George Lin <giolin@google.com> | Wed Sep 06 03:32:01 2023 +0000 |
committer | George Lin <giolin@google.com> | Wed Sep 06 17:12:36 2023 +0000 |
tree | 4d1b124c6c05bca5008dda8c9c93c07c0eaa0ea8 | |
parent | 014d4fd701ebd67346d15338755001bbd58ba94f [diff] |
Give state description to the tabs Test: Manaully tested it reads the selected shortcut Bug: 280558142 Change-Id: I17e4a3da4cc22562751fb76ae85a66159e53e664
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 6879ffc..8891b03 100644 --- a/src/com/android/customization/picker/quickaffordance/ui/adapter/SlotTabAdapter.kt +++ b/src/com/android/customization/picker/quickaffordance/ui/adapter/SlotTabAdapter.kt
@@ -62,6 +62,12 @@ null } ) + val stateDescription = + item.selectedQuickAffordances + .find { it.isSelected.value } + ?.text + ?.asString(holder.itemView.context) + stateDescription?.let { holder.itemView.stateDescription = it } } class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {