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

Commit 305e9200 authored by Tony Wickham's avatar Tony Wickham Committed by Tony
Browse files

Add notification count to content description for badged apps

Bug: 70389249
Change-Id: If7f43941d501ba807adbb33d489da3944c012e94
parent 9c70e7e2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -132,6 +132,11 @@
    <!-- Accessibility -->
    <!-- The format string for when an app is temporarily disabled. -->
    <string name="disabled_app_label">Disabled <xliff:g id="app_name" example="Messenger">%1$s</xliff:g></string>
    <!-- The format string for when an app has a notification dot (meaning it has associated notifications). -->
    <plurals name="badged_app_label">
        <item quantity="one"><xliff:g id="app_name" example="Messenger">%1$s</xliff:g>, has <xliff:g id="notification_count" example="1">%2$d</xliff:g> notification</item>
        <item quantity="other"><xliff:g id="app_name" example="Messenger">%1$s</xliff:g>, has <xliff:g id="notification_count" example="3">%2$d</xliff:g> notifications</item>
    </plurals>
    <skip />

    <!-- The format string for default page scroll text [CHAR_LIMIT=none] -->
+9 −0
Original line number Diff line number Diff line
@@ -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);
                }
            }
        }
    }