Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dff8b1b6 authored by Daniel Solomon's avatar Daniel Solomon
Browse files

Fix Display White Balance color temperature on enable

Currently the ambient-to-display color temperature spline is applied to
all color temperature values, including the placeholder value -1.0 that
is used when DWB is first enabled. When this happens, display color
temperature is first set to its lowest value, and is then set to a
meaningful value when the sensor updates its first reading. This
behavior is incorrect.

To fix this, check for a valid color temperature value
before applying the spline.

Bug 130137407
Test: manual

Change-Id: I67a06504e499411fd34e05569e9cd0cbc9f81df1
parent 85e35eb1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ public class DisplayWhiteBalanceController implements
        final long time = System.currentTimeMillis();
        float ambientColorTemperature = mColorTemperatureFilter.getEstimate(time);

        if (mAmbientToDisplayColorTemperatureSpline != null) {
        if (mAmbientToDisplayColorTemperatureSpline != null && ambientColorTemperature != -1.0f) {
            ambientColorTemperature =
                mAmbientToDisplayColorTemperatureSpline.interpolate(ambientColorTemperature);
        }