Merge "A11y: Show title if ticker is not available" into nyc-dev am: bc243b5f49
am: b45ed6b790
* commit 'b45ed6b79059d70c1da1954d8288dceb5594edca':
A11y: Show title if ticker is not available
Change-Id: I9c6203a53d9db03efb792951115cf39488718d21
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user