Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -578,6 +578,9 @@ Software implementation will be used if config_hardware_auto_brightness_available is not set --> <bool name="config_automatic_brightness_available">false</bool> <!-- Fast brightness animation ramp rate --> <integer translatable="false" name="config_brightness_ramp_rate_fast">200</integer> <!-- Don't name config resources like this. It should look like config_annoyDianne --> <bool name="config_annoy_dianne">true</bool> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1766,6 +1766,7 @@ <java-symbol type="integer" name="config_shutdownBatteryTemperature" /> <java-symbol type="integer" name="config_undockedHdmiRotation" /> <java-symbol type="integer" name="config_virtualKeyQuietTimeMillis" /> <java-symbol type="integer" name="config_brightness_ramp_rate_fast" /> <java-symbol type="layout" name="am_compat_mode_dialog" /> <java-symbol type="layout" name="launch_warning" /> <java-symbol type="layout" name="safe_mode" /> Loading services/core/java/com/android/server/display/DisplayPowerController.java +7 −2 Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call private static final float TYPICAL_PROXIMITY_THRESHOLD = 5.0f; // Brightness animation ramp rate in brightness units per second. private static final int BRIGHTNESS_RAMP_RATE_FAST = 200; private static final int BRIGHTNESS_RAMP_RATE_SLOW = 40; private static final int REPORTED_TO_POLICY_SCREEN_OFF = 0; Loading Loading @@ -244,6 +243,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call private boolean mAppliedDimming; private boolean mAppliedLowPower; // Brightness ramp rate fast. private final int mBrightnessRampRateFast; // The controller for the automatic brightness level. private AutomaticBrightnessController mAutomaticBrightnessController; Loading Loading @@ -303,6 +305,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call mAllowAutoBrightnessWhileDozingConfig = resources.getBoolean( com.android.internal.R.bool.config_allowAutoBrightnessWhileDozing); mBrightnessRampRateFast = resources.getInteger( com.android.internal.R.integer.config_brightness_ramp_rate_fast); int lightSensorRate = resources.getInteger( com.android.internal.R.integer.config_autoBrightnessLightSensorRate); long brighteningLightDebounce = resources.getInteger( Loading Loading @@ -698,7 +703,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call if (!mPendingScreenOff) { if (state == Display.STATE_ON || state == Display.STATE_DOZE) { animateScreenBrightness(brightness, slowChange ? BRIGHTNESS_RAMP_RATE_SLOW : BRIGHTNESS_RAMP_RATE_FAST); slowChange ? BRIGHTNESS_RAMP_RATE_SLOW : mBrightnessRampRateFast); } else { animateScreenBrightness(brightness, 0); } Loading Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -578,6 +578,9 @@ Software implementation will be used if config_hardware_auto_brightness_available is not set --> <bool name="config_automatic_brightness_available">false</bool> <!-- Fast brightness animation ramp rate --> <integer translatable="false" name="config_brightness_ramp_rate_fast">200</integer> <!-- Don't name config resources like this. It should look like config_annoyDianne --> <bool name="config_annoy_dianne">true</bool> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1766,6 +1766,7 @@ <java-symbol type="integer" name="config_shutdownBatteryTemperature" /> <java-symbol type="integer" name="config_undockedHdmiRotation" /> <java-symbol type="integer" name="config_virtualKeyQuietTimeMillis" /> <java-symbol type="integer" name="config_brightness_ramp_rate_fast" /> <java-symbol type="layout" name="am_compat_mode_dialog" /> <java-symbol type="layout" name="launch_warning" /> <java-symbol type="layout" name="safe_mode" /> Loading
services/core/java/com/android/server/display/DisplayPowerController.java +7 −2 Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call private static final float TYPICAL_PROXIMITY_THRESHOLD = 5.0f; // Brightness animation ramp rate in brightness units per second. private static final int BRIGHTNESS_RAMP_RATE_FAST = 200; private static final int BRIGHTNESS_RAMP_RATE_SLOW = 40; private static final int REPORTED_TO_POLICY_SCREEN_OFF = 0; Loading Loading @@ -244,6 +243,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call private boolean mAppliedDimming; private boolean mAppliedLowPower; // Brightness ramp rate fast. private final int mBrightnessRampRateFast; // The controller for the automatic brightness level. private AutomaticBrightnessController mAutomaticBrightnessController; Loading Loading @@ -303,6 +305,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call mAllowAutoBrightnessWhileDozingConfig = resources.getBoolean( com.android.internal.R.bool.config_allowAutoBrightnessWhileDozing); mBrightnessRampRateFast = resources.getInteger( com.android.internal.R.integer.config_brightness_ramp_rate_fast); int lightSensorRate = resources.getInteger( com.android.internal.R.integer.config_autoBrightnessLightSensorRate); long brighteningLightDebounce = resources.getInteger( Loading Loading @@ -698,7 +703,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call if (!mPendingScreenOff) { if (state == Display.STATE_ON || state == Display.STATE_DOZE) { animateScreenBrightness(brightness, slowChange ? BRIGHTNESS_RAMP_RATE_SLOW : BRIGHTNESS_RAMP_RATE_FAST); slowChange ? BRIGHTNESS_RAMP_RATE_SLOW : mBrightnessRampRateFast); } else { animateScreenBrightness(brightness, 0); } Loading