Enforce min value on panel slices slider
We did not set the min value on slider slices when converting them from preference to slices, which makes the slices all have min 0. However, there are some slider which should have min value greater than 0, for example, call and alarm. We should get the min value and apply it to slider slice to make it consistent with what we have in settings pref. Test: Manual verification Test: make -j40 RunSettingRobotests Test: atest VolumeSeekBarPreferenceControllerTest Fixes: 130439216 Fixes: 130358208 Change-Id: Ib4399c36c7da3ac41a6d46a6c150f0ec1b9b0b0f
This commit is contained in:
@@ -122,17 +122,31 @@ public class RemoteVolumePreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getMaxSteps_controllerNull_returnZero() {
|
||||
public void getMinValue_controllerNull_returnZero() {
|
||||
mController.mMediaController = null;
|
||||
|
||||
assertThat(mController.getMaxSteps()).isEqualTo(0);
|
||||
assertThat(mController.getMin()).isEqualTo(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getMaxSteps_controllerExists_returnValue() {
|
||||
public void getMinValue_controllerExists_returnValue() {
|
||||
mController.mMediaController = mMediaController;
|
||||
|
||||
assertThat(mController.getMaxSteps()).isEqualTo(MAX_POS);
|
||||
assertThat(mController.getMin()).isEqualTo(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getMaxValue_controllerNull_returnZero() {
|
||||
mController.mMediaController = null;
|
||||
|
||||
assertThat(mController.getMax()).isEqualTo(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getMaxValue_controllerExists_returnValue() {
|
||||
mController.mMediaController = mMediaController;
|
||||
|
||||
assertThat(mController.getMax()).isEqualTo(MAX_POS);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user