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

Commit 9dc20214 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

Merge "Reset cached light sensor values when toggling auto-brightness mode" into ics-mr0

parents 141fc986 320a10ad
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3043,6 +3043,11 @@ public class PowerManagerService extends IPowerManager.Stub
        }
        if (mSensorManager != null && mLightSensorEnabled != enable) {
            mLightSensorEnabled = enable;
            // clear previous values so we will adjust to current brightness when
            // auto-brightness is reenabled
            mHighestLightSensorValue = -1;
            mLightSensorValue = -1;

            // clear calling identity so sensor manager battery stats are accurate
            long identity = Binder.clearCallingIdentity();
            try {