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

Commit c1103db2 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Add notification count to content description for badged apps" into ub-launcher3-master

parents 5ddd5416 305e9200
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);
                }
            }
        }
    }