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:
@@ -25,7 +25,7 @@ public class FakeSliderController extends SliderPreferenceController {
|
||||
|
||||
public static final String AVAILABILITY_KEY = "fake_slider_availability_key";
|
||||
|
||||
public static final int MAX_STEPS = 9;
|
||||
public static final int MAX_VALUE = 9;
|
||||
|
||||
private static final String SETTING_KEY = "fake_slider_key";
|
||||
|
||||
@@ -44,8 +44,13 @@ public class FakeSliderController extends SliderPreferenceController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSteps() {
|
||||
return MAX_STEPS;
|
||||
public int getMax() {
|
||||
return MAX_VALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMin() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user