Fixing content description of a promise icon that is fully downloaded.

Bug: 65779803
Change-Id: I912a70310c6a44f0b0b443cebf77608fd19bdc71
This commit is contained in:
Mario Bertschler committed 2017-09-27 17:05:21 -07:00
1 parent 534fa8a62b
commit 230612f502
1 file changed
+11 -5
+11 -5
View File
@@ -496,11 +496,17 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
public PreloadIconDrawable applyProgressLevel(int progressLevel) {
if (getTag() instanceof ItemInfoWithIcon) {
ItemInfoWithIcon info = (ItemInfoWithIcon) getTag();
setContentDescription(progressLevel > 0
? getContext().getString(R.string.app_downloading_title, info.title,
NumberFormat.getPercentInstance().format(progressLevel * 0.01))
: getContext().getString(R.string.app_waiting_download_title, info.title));
if (progressLevel >= 100) {
setContentDescription(info.contentDescription != null
? info.contentDescription : "");
} else if (progressLevel > 0) {
setContentDescription(getContext()
.getString(R.string.app_downloading_title, info.title,
NumberFormat.getPercentInstance().format(progressLevel * 0.01)));
} else {
setContentDescription(getContext()
.getString(R.string.app_waiting_download_title, info.title));
}
if (mIcon != null) {
final PreloadIconDrawable preloadDrawable;
if (mIcon instanceof PreloadIconDrawable) {