Merge "Set content description on ambien volume sliders" into main

This commit is contained in:
Angela Wang
2025-02-27 01:29:18 -08:00
committed by Android (Google) Code Review
2 changed files with 13 additions and 0 deletions

View File

@@ -174,6 +174,12 @@
<string name="bluetooth_ambient_volume_control_left">Left</string>
<!-- Connected devices settings. The text to show the control is for right side device. [CHAR LIMIT=30] -->
<string name="bluetooth_ambient_volume_control_right">Right</string>
<!-- Connected devices settings. Content description for unified ambient control slider. [CHAR LIMIT=NONE] -->
<string name="bluetooth_ambient_volume_control_description">Surroundings</string>
<!-- Connected devices settings. Content description for left ambient control slider. [CHAR LIMIT=NONE] -->
<string name="bluetooth_ambient_volume_control_left_description">Left surroundings</string>
<!-- Connected devices settings. Content description for right ambient control slider.. [CHAR LIMIT=NONE] -->
<string name="bluetooth_ambient_volume_control_right_description">Right surroundings</string>
<!-- Connected devices settings. Content description for a button, that mute ambient volume [CHAR_LIMIT=NONE] -->
<string name="bluetooth_ambient_volume_mute">Mute surroundings</string>
<!-- Connected devices settings. Content description for a button, that unmute ambient volume [CHAR LIMIT=NONE] -->

View File

@@ -339,9 +339,16 @@ public class AmbientVolumePreference extends PreferenceGroup implements AmbientV
if (side == SIDE_LEFT) {
slider.setTitle(
getContext().getString(R.string.bluetooth_ambient_volume_control_left));
slider.setSliderContentDescription(getContext().getString(
R.string.bluetooth_ambient_volume_control_left_description));
} else if (side == SIDE_RIGHT) {
slider.setTitle(
getContext().getString(R.string.bluetooth_ambient_volume_control_right));
slider.setSliderContentDescription(getContext().getString(
R.string.bluetooth_ambient_volume_control_right_description));
} else {
slider.setSliderContentDescription(getContext().getString(
R.string.bluetooth_ambient_volume_control_description));
}
mSideToSliderMap.put(side, slider);
}