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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user