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

Commit 824e7a5c authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

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

am: 9f635a82

Change-Id: I48ec2e5db7dbb54125d72990d115fb5d04ff303f
parents cc63daaf 9f635a82
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);