Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 230612f5 authored by Mario Bertschler's avatar Mario Bertschler
Browse files

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

Bug: 65779803
Change-Id: I912a70310c6a44f0b0b443cebf77608fd19bdc71
parent 534fa8a6
Loading
Loading
Loading
Loading
+11 −5
Original line number Original line Diff line number Diff line
@@ -496,11 +496,17 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
    public PreloadIconDrawable applyProgressLevel(int progressLevel) {
    public PreloadIconDrawable applyProgressLevel(int progressLevel) {
        if (getTag() instanceof ItemInfoWithIcon) {
        if (getTag() instanceof ItemInfoWithIcon) {
            ItemInfoWithIcon info = (ItemInfoWithIcon) getTag();
            ItemInfoWithIcon info = (ItemInfoWithIcon) getTag();
            setContentDescription(progressLevel > 0
            if (progressLevel >= 100) {
                    ? getContext().getString(R.string.app_downloading_title, info.title,
                setContentDescription(info.contentDescription != null
                    NumberFormat.getPercentInstance().format(progressLevel * 0.01))
                        ? info.contentDescription : "");
                    : getContext().getString(R.string.app_waiting_download_title, info.title));
            } 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) {
            if (mIcon != null) {
                final PreloadIconDrawable preloadDrawable;
                final PreloadIconDrawable preloadDrawable;
                if (mIcon instanceof PreloadIconDrawable) {
                if (mIcon instanceof PreloadIconDrawable) {