Merge "Fix manual brightness slider"
This commit is contained in:
@@ -479,6 +479,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
mScreenBrightnessForVr = getScreenBrightnessForVrSetting();
|
||||
mAutoBrightnessAdjustment = getAutoBrightnessAdjustmentSetting();
|
||||
mTemporaryScreenBrightness = -1;
|
||||
mPendingScreenBrightnessSetting = -1;
|
||||
mTemporaryAutoBrightnessAdjustment = Float.NaN;
|
||||
}
|
||||
|
||||
@@ -1476,6 +1477,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
mPendingScreenBrightnessSetting = -1;
|
||||
return false;
|
||||
}
|
||||
mCurrentScreenBrightnessSetting = mPendingScreenBrightnessSetting;
|
||||
mLastUserSetScreenBrightness = mPendingScreenBrightnessSetting;
|
||||
mPendingScreenBrightnessSetting = -1;
|
||||
return true;
|
||||
@@ -1484,7 +1486,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
private void notifyBrightnessChanged(int brightness, boolean userInitiated,
|
||||
boolean hadUserDataPoint) {
|
||||
final float brightnessInNits = convertToNits(brightness);
|
||||
if (brightnessInNits >= 0.0f && mAutomaticBrightnessController != null) {
|
||||
if (mPowerRequest.useAutoBrightness && brightnessInNits >= 0.0f
|
||||
&& mAutomaticBrightnessController != null) {
|
||||
// We only want to track changes on devices that can actually map the display backlight
|
||||
// values into a physical brightness unit since the value provided by the API is in
|
||||
// nits and not using the arbitrary backlight units.
|
||||
|
||||
Reference in New Issue
Block a user