DO NOT MERGE: Dynamic doze check should be required before adjusting sensor rate.
Some devices have catastrophic firmware issues in switching the sensor rate; for these devices, the sensor rate switch should be skipped entirely. Change-Id: I04fc3d27c99f95b33f86f012a8d398f817f7713a
This commit is contained in:
@@ -275,9 +275,9 @@ class AutomaticBrightnessController {
|
||||
boolean enableSensor = enable && !dozing;
|
||||
if (enableSensor && !mLightSensorEnabled && mActiveDozeLightSensor) {
|
||||
mActiveDozeLightSensor = false;
|
||||
} else if (!enableSensor && mLightSensorEnabled) {
|
||||
} else if (!enableSensor && mLightSensorEnabled && mLuxLevels.hasDynamicDozeBrightness()) {
|
||||
// keep the light sensor active until another light sample is taken while dozing
|
||||
mActiveDozeLightSensor = mLuxLevels.hasDynamicDozeBrightness();
|
||||
mActiveDozeLightSensor = true;
|
||||
adjustLightSensorRate(mInitialLightSensorRate);
|
||||
if (mUseNewSensorSamplesForDoze) {
|
||||
mAmbientLightRingBuffer.clear();
|
||||
|
||||
Reference in New Issue
Block a user