Merge "Update battery content description." into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-31 20:56:37 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 2 deletions

View File

@@ -495,6 +495,9 @@
<!-- Content description of the battery level icon for accessibility (not shown on the screen). [CHAR LIMIT=NONE] --> <!-- 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> <string name="accessibility_battery_level">Battery <xliff:g id="number">%d</xliff:g> percent.</string>
<!-- Content description of the battery level icon for accessibility, including the estimated time remaining before the phone runs out of battery (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_battery_level_with_estimate">Battery <xliff:g id="percentage" example="95%">%1$s</xliff:g> percent, about <xliff:g id="time" example="Until 3:15pm">%2$s</xliff:g> left based on your usage</string>
<!-- Content description of the battery level icon for accessibility while the device is charging (not shown on the screen). [CHAR LIMIT=NONE] --> <!-- 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> <string name="accessibility_battery_level_charging">Battery charging, <xliff:g id="battery_percentage">%d</xliff:g> percent.</string>

View File

@@ -356,8 +356,8 @@ public class BatteryMeterView extends LinearLayout implements
if (estimate != null) { if (estimate != null) {
mBatteryPercentView.setText(estimate); mBatteryPercentView.setText(estimate);
setContentDescription(getContext().getString( setContentDescription(getContext().getString(
R.string.battery_low_percent_format_hybrid, mLevel, estimate)); R.string.accessibility_battery_level_with_estimate,
mLevel, estimate));
} else { } else {
setPercentTextAtCurrentLevel(); setPercentTextAtCurrentLevel();
} }