Sound: VolumeSeekBarPreference must observe min vol index

The volume sliders must observe the minimum volume stream
  index, not just the maximum.

Bug: 74985293
Test: try to mute alarms through UI and fail
Change-Id: Icc5173898eb951239d02f5822239085f1ec3fc9a
This commit is contained in:
Jean-Michel Trivi
2018-04-02 14:55:27 -07:00
parent 9dc3f74ccf
commit 32cf7ea45c

View File

@@ -83,6 +83,7 @@ public class VolumeSeekBarPreference extends SeekBarPreference {
public void setStream(int stream) {
mStream = stream;
setMax(mAudioManager.getStreamMaxVolume(mStream));
setMin(mAudioManager.getStreamMinVolume(mStream));
setProgress(mAudioManager.getStreamVolume(mStream));
}