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:
@@ -44,7 +44,7 @@ public abstract class SliderPreferenceController extends BasePreferenceControlle
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the value of the Slider's position based on the range: [0, maxSteps).
|
||||
* @return the value of the Slider's position based on the range: [min, max].
|
||||
*/
|
||||
public abstract int getSliderPosition();
|
||||
|
||||
@@ -57,9 +57,14 @@ public abstract class SliderPreferenceController extends BasePreferenceControlle
|
||||
public abstract boolean setSliderPosition(int position);
|
||||
|
||||
/**
|
||||
* @return the number of steps supported by the slider.
|
||||
* @return the maximum value supported by the slider.
|
||||
*/
|
||||
public abstract int getMaxSteps();
|
||||
public abstract int getMax();
|
||||
|
||||
/**
|
||||
* @return the minimum value supported by the slider.
|
||||
*/
|
||||
public abstract int getMin();
|
||||
|
||||
@Override
|
||||
public int getSliceType() {
|
||||
|
Reference in New Issue
Block a user