Fixing content description of a promise icon that is fully downloaded.
Bug: 65779803 Change-Id: I912a70310c6a44f0b0b443cebf77608fd19bdc71
This commit is contained in:
1 parent
534fa8a62b
commit
230612f502
1 file changed
+11
-5
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user