Loading services/java/com/android/server/PowerManagerService.java +8 −1 Original line number Diff line number Diff line Loading @@ -1676,7 +1676,7 @@ class PowerManagerService extends IPowerManager.Stub if (err == 0) { mLastScreenOnTime = (on ? SystemClock.elapsedRealtime() : 0); if (mUseSoftwareAutoBrightness) { enableLightSensor(on && mAutoBrightessEnabled); enableLightSensor(on); if (!on) { // make sure button and key backlights are off too mButtonLight.turnOff(); Loading @@ -1689,6 +1689,12 @@ class PowerManagerService extends IPowerManager.Stub lightFilterStop(); resetLastLightValues(); } else if (!mAutoBrightessEnabled) { /* Force a light sensor reset since we enabled it when the screen came on */ mAutoBrightessEnabled = true; setScreenBrightnessMode(Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL); } } } return err; Loading Loading @@ -2573,6 +2579,7 @@ class PowerManagerService extends IPowerManager.Stub return; } // do not allow light sensor value to decrease unless // user has actively permitted it if (mLightDecrease) { Loading Loading
services/java/com/android/server/PowerManagerService.java +8 −1 Original line number Diff line number Diff line Loading @@ -1676,7 +1676,7 @@ class PowerManagerService extends IPowerManager.Stub if (err == 0) { mLastScreenOnTime = (on ? SystemClock.elapsedRealtime() : 0); if (mUseSoftwareAutoBrightness) { enableLightSensor(on && mAutoBrightessEnabled); enableLightSensor(on); if (!on) { // make sure button and key backlights are off too mButtonLight.turnOff(); Loading @@ -1689,6 +1689,12 @@ class PowerManagerService extends IPowerManager.Stub lightFilterStop(); resetLastLightValues(); } else if (!mAutoBrightessEnabled) { /* Force a light sensor reset since we enabled it when the screen came on */ mAutoBrightessEnabled = true; setScreenBrightnessMode(Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL); } } } return err; Loading Loading @@ -2573,6 +2579,7 @@ class PowerManagerService extends IPowerManager.Stub return; } // do not allow light sensor value to decrease unless // user has actively permitted it if (mLightDecrease) { Loading