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;
|
boolean enableSensor = enable && !dozing;
|
||||||
if (enableSensor && !mLightSensorEnabled && mActiveDozeLightSensor) {
|
if (enableSensor && !mLightSensorEnabled && mActiveDozeLightSensor) {
|
||||||
mActiveDozeLightSensor = false;
|
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
|
// keep the light sensor active until another light sample is taken while dozing
|
||||||
mActiveDozeLightSensor = mLuxLevels.hasDynamicDozeBrightness();
|
mActiveDozeLightSensor = true;
|
||||||
adjustLightSensorRate(mInitialLightSensorRate);
|
adjustLightSensorRate(mInitialLightSensorRate);
|
||||||
if (mUseNewSensorSamplesForDoze) {
|
if (mUseNewSensorSamplesForDoze) {
|
||||||
mAmbientLightRingBuffer.clear();
|
mAmbientLightRingBuffer.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user