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

Commit 112e0763 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: b45ed6b7

am: 764adf03

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

Change-Id: I825c85ba5c552814047bdd26a9dfde5c659a0f67
parents 13951008 764adf03
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);
    }

}