Add notification count to content description for badged apps

Bug: 70389249
Change-Id: If7f43941d501ba807adbb33d489da3944c012e94
This commit is contained in:
Tony Wickham authored and Tony committed 2018-02-05 10:08:52 -06:00
1 parent 9c70e7e220
commit 305e920048
2 files changed
+14

No files matched your search

@@ -560,6 +560,15 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
invalidate();
}
}
if (itemInfo.contentDescription != null) {
if (hasBadge()) {
int count = mBadgeInfo.getNotificationCount();
setContentDescription(getContext().getResources().getQuantityString(
R.plurals.badged_app_label, count, itemInfo.contentDescription, count));
} else {
setContentDescription(itemInfo.contentDescription);
}
}
}
}