Fix talkback doesn't speak subtext info

In the original design, we only set title description for
view holder, this is wrong. It causes talkback can't
speak subtext info.

Currently, we set the title content description in the title
view directly, so talkback can say the title and subtext now
when talkback focus on an app view.

Test: Talkback speaks full information for an app entry
Fix: 177873163
Change-Id: I94996d596a85cc2813ed1b10cdd4ed2bee62f4a9
This commit is contained in:
Tsung-Mao Fang
2021-05-20 21:25:22 +08:00
parent bac284a622
commit a51c9988c5
3 changed files with 28 additions and 6 deletions

View File

@@ -1422,9 +1422,8 @@ public class ManageApplications extends InstrumentedFragment
// Bind the data efficiently with the holder
final ApplicationsState.AppEntry entry = mEntries.get(position);
synchronized (entry) {
holder.setTitle(entry.label);
mState.ensureLabelDescription(entry);
holder.itemView.setContentDescription(entry.labelDescription);
holder.setTitle(entry.label, entry.labelDescription);
mState.ensureIcon(entry);
holder.setIcon(entry.icon);
updateSummary(holder, entry);