diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index ea55ac2be989b..981b2ddd76815 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -381,6 +381,9 @@
Battery %d percent.
+
+ Battery charging, %d percent.
+
System settings.
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
index 0bf81e9654bed..d8b95cc28b57c 100644
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@@ -89,7 +89,8 @@ public class BatteryMeterView extends ImageView implements
@Override
public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
setContentDescription(
- getContext().getString(R.string.accessibility_battery_level, level));
+ getContext().getString(charging ? R.string.accessibility_battery_level_charging
+ : R.string.accessibility_battery_level, level));
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
index 32939641f95b6..66152fcd965e3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -61,6 +61,7 @@ public class Clock extends TextView implements DemoMode, Tunable {
private Calendar mCalendar;
private String mClockFormatString;
private SimpleDateFormat mClockFormat;
+ private SimpleDateFormat mContentDescriptionFormat;
private Locale mLocale;
private static final int AM_PM_STYLE_NORMAL = 0;
@@ -158,6 +159,7 @@ public class Clock extends TextView implements DemoMode, Tunable {
if (mDemoMode) return;
mCalendar.setTimeInMillis(System.currentTimeMillis());
setText(getSmallTime());
+ setContentDescription(mContentDescriptionFormat.format(mCalendar.getTime()));
}
@Override
@@ -207,6 +209,7 @@ public class Clock extends TextView implements DemoMode, Tunable {
? is24 ? d.timeFormat_Hms : d.timeFormat_hms
: is24 ? d.timeFormat_Hm : d.timeFormat_hm;
if (!format.equals(mClockFormatString)) {
+ mContentDescriptionFormat = new SimpleDateFormat(format);
/*
* Search for an unquoted "a" in the format string, so we can
* add dummy characters around it to let us find it again after
@@ -295,6 +298,7 @@ public class Clock extends TextView implements DemoMode, Tunable {
mCalendar.set(Calendar.MINUTE, mm);
}
setText(getSmallTime());
+ setContentDescription(mContentDescriptionFormat.format(mCalendar.getTime()));
}
}