Loading packages/SystemUI/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -381,6 +381,9 @@ <!-- Content description of the battery level icon for accessibility (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_battery_level">Battery <xliff:g id="number">%d</xliff:g> percent.</string> <!-- Content description of the battery level icon for accessibility while the device is charging (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_battery_level_charging">Battery charging, <xliff:g id="battery_percentage">%d</xliff:g> percent.</string> <!-- Content description of the button for showing a settings panel in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_settings_button">System settings.</string> Loading packages/SystemUI/src/com/android/systemui/BatteryMeterView.java +2 −1 Original line number Diff line number Diff line Loading @@ -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 Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java +4 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 Loading Loading @@ -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 Loading Loading @@ -295,6 +298,7 @@ public class Clock extends TextView implements DemoMode, Tunable { mCalendar.set(Calendar.MINUTE, mm); } setText(getSmallTime()); setContentDescription(mContentDescriptionFormat.format(mCalendar.getTime())); } } Loading Loading
packages/SystemUI/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -381,6 +381,9 @@ <!-- Content description of the battery level icon for accessibility (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_battery_level">Battery <xliff:g id="number">%d</xliff:g> percent.</string> <!-- Content description of the battery level icon for accessibility while the device is charging (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_battery_level_charging">Battery charging, <xliff:g id="battery_percentage">%d</xliff:g> percent.</string> <!-- Content description of the button for showing a settings panel in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_settings_button">System settings.</string> Loading
packages/SystemUI/src/com/android/systemui/BatteryMeterView.java +2 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java +4 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 Loading Loading @@ -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 Loading Loading @@ -295,6 +298,7 @@ public class Clock extends TextView implements DemoMode, Tunable { mCalendar.set(Calendar.MINUTE, mm); } setText(getSmallTime()); setContentDescription(mContentDescriptionFormat.format(mCalendar.getTime())); } } Loading