Merge "Enforce min value on panel slices slider" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cef4e42dc2
@@ -55,7 +55,8 @@ public class NightDisplayIntensityPreferenceController extends SliderPreferenceC
|
||||
super.displayPreference(screen);
|
||||
final SeekBarPreference preference = screen.findPreference(getPreferenceKey());
|
||||
preference.setContinuousUpdates(true);
|
||||
preference.setMax(getMaxSteps());
|
||||
preference.setMax(getMax());
|
||||
preference.setMin(getMin());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -75,10 +76,15 @@ public class NightDisplayIntensityPreferenceController extends SliderPreferenceC
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSteps() {
|
||||
public int getMax() {
|
||||
return convertTemperature(ColorDisplayManager.getMinimumColorTemperature(mContext));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMin() {
|
||||
return ColorDisplayManager.getMinimumColorTemperature(mContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inverts and range-adjusts a raw value from the SeekBar (i.e. [0, maxTemp-minTemp]), or
|
||||
* converts an inverted and range-adjusted value to the raw SeekBar value, depending on the
|
||||
|
Reference in New Issue
Block a user