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

Commit 8649300f authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge "A11y: Show title if ticker is not available" into nyc-dev am: bc243b5f

am: dd3ef2dd

* commit 'dd3ef2dd':
  A11y: Show title if ticker is not available

Change-Id: I87c571b4842a7b1c23e04855e040c618a53f6584
parents dcec9616 dd3ef2dd
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -327,7 +327,14 @@ public class StatusBarIconView extends AnimatedImageView {
    public static String contentDescForNotification(Context c, Notification n) {
        Notification.Builder builder = Notification.Builder.recoverBuilder(c, n);
        String appName = builder.loadHeaderAppName();

        CharSequence title = n.extras.getString(Notification.EXTRA_TITLE);
        CharSequence ticker = n.tickerText;
        return c.getString(R.string.accessibility_desc_notification_icon, appName, ticker);

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

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

}