Loading services/core/java/com/android/server/display/AutomaticBrightnessController.java +7 −3 Original line number Diff line number Diff line Loading @@ -288,6 +288,10 @@ class AutomaticBrightnessController { return mScreenAutoBrightness; } public boolean hasValidAmbientLux() { return mAmbientLuxValid; } public float getAutomaticScreenBrightnessAdjustment() { return mBrightnessMapper.getAutoBrightnessAdjustment(); } Loading Loading @@ -648,9 +652,9 @@ class AutomaticBrightnessController { mLightSensorWarmUpTimeConfig + mLightSensorEnableTime; if (time < timeWhenSensorWarmedUp) { if (mLoggingEnabled) { Slog.d(TAG, "updateAmbientLux: Sensor not ready yet: " + "time=" + time + ", " + "timeWhenSensorWarmedUp=" + timeWhenSensorWarmedUp); Slog.d(TAG, "updateAmbientLux: Sensor not ready yet: " + "time=" + time + ", " + "timeWhenSensorWarmedUp=" + timeWhenSensorWarmedUp); } mHandler.sendEmptyMessageAtTime(MSG_UPDATE_AMBIENT_LUX, timeWhenSensorWarmedUp); Loading services/core/java/com/android/server/display/DisplayPowerController.java +7 −1 Original line number Diff line number Diff line Loading @@ -874,7 +874,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call // If the brightness is already set then it's been overridden by something other than the // user, or is a temporary adjustment. final boolean userInitiatedChange = brightness < 0 boolean userInitiatedChange = brightness < 0 && (autoBrightnessAdjustmentChanged || userSetBrightnessChanged); boolean hadUserBrightnessPoint = false; Loading Loading @@ -1010,6 +1010,12 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call } if (!brightnessIsTemporary) { if (userInitiatedChange && (mAutomaticBrightnessController == null || !mAutomaticBrightnessController.hasValidAmbientLux())) { // If we don't have a valid lux reading we can't report a valid // slider event so notify as if the system changed the brightness. userInitiatedChange = false; } notifyBrightnessChanged(brightness, userInitiatedChange, hadUserBrightnessPoint); } Loading Loading
services/core/java/com/android/server/display/AutomaticBrightnessController.java +7 −3 Original line number Diff line number Diff line Loading @@ -288,6 +288,10 @@ class AutomaticBrightnessController { return mScreenAutoBrightness; } public boolean hasValidAmbientLux() { return mAmbientLuxValid; } public float getAutomaticScreenBrightnessAdjustment() { return mBrightnessMapper.getAutoBrightnessAdjustment(); } Loading Loading @@ -648,9 +652,9 @@ class AutomaticBrightnessController { mLightSensorWarmUpTimeConfig + mLightSensorEnableTime; if (time < timeWhenSensorWarmedUp) { if (mLoggingEnabled) { Slog.d(TAG, "updateAmbientLux: Sensor not ready yet: " + "time=" + time + ", " + "timeWhenSensorWarmedUp=" + timeWhenSensorWarmedUp); Slog.d(TAG, "updateAmbientLux: Sensor not ready yet: " + "time=" + time + ", " + "timeWhenSensorWarmedUp=" + timeWhenSensorWarmedUp); } mHandler.sendEmptyMessageAtTime(MSG_UPDATE_AMBIENT_LUX, timeWhenSensorWarmedUp); Loading
services/core/java/com/android/server/display/DisplayPowerController.java +7 −1 Original line number Diff line number Diff line Loading @@ -874,7 +874,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call // If the brightness is already set then it's been overridden by something other than the // user, or is a temporary adjustment. final boolean userInitiatedChange = brightness < 0 boolean userInitiatedChange = brightness < 0 && (autoBrightnessAdjustmentChanged || userSetBrightnessChanged); boolean hadUserBrightnessPoint = false; Loading Loading @@ -1010,6 +1010,12 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call } if (!brightnessIsTemporary) { if (userInitiatedChange && (mAutomaticBrightnessController == null || !mAutomaticBrightnessController.hasValidAmbientLux())) { // If we don't have a valid lux reading we can't report a valid // slider event so notify as if the system changed the brightness. userInitiatedChange = false; } notifyBrightnessChanged(brightness, userInitiatedChange, hadUserBrightnessPoint); } Loading