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

Commit 5403f387 authored by Adrian Roos's avatar Adrian Roos Committed by Android (Google) Code Review
Browse files

Merge "A11y: Better label status bar icons" into oc-dev

parents b2aa0ceb f76600e7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -459,9 +459,13 @@ public class StatusBarIconView extends AnimatedImageView {
        }

        CharSequence title = n.extras.getCharSequence(Notification.EXTRA_TITLE);
        CharSequence text = n.extras.getCharSequence(Notification.EXTRA_TEXT);
        CharSequence ticker = n.tickerText;

        CharSequence desc = !TextUtils.isEmpty(title) ? title
        // Some apps just put the app name into the title
        CharSequence titleOrText = TextUtils.equals(title, appName) ? text : title;

        CharSequence desc = !TextUtils.isEmpty(titleOrText) ? titleOrText
                : !TextUtils.isEmpty(ticker) ? ticker : "";

        return c.getString(R.string.accessibility_desc_notification_icon, appName, desc);