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

Commit 9f635a82 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

Change-Id: I4321310007d249d3fcf9dd169a55b82ad0e500aa
parents f29eb24c 5403f387
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);