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

Commit 1f3da1c8 authored by Julius D'souza's avatar Julius D'souza
Browse files

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
parent 02d802e7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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();