Loading core/java/android/hardware/display/ColorDisplayManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,13 @@ public final class ColorDisplayManager { return context.getResources().getBoolean(R.bool.config_nightDisplayAvailable); } /** * Returns {@code true} if display white balance is supported by the device. */ public static boolean isDisplayWhiteBalanceAvailable(Context context) { return context.getResources().getBoolean(R.bool.config_displayWhiteBalanceAvailable); } private static class ColorDisplayManagerInternal { private static ColorDisplayManagerInternal sInstance; Loading core/java/android/provider/Settings.java +11 −0 Original line number Diff line number Diff line Loading @@ -7956,6 +7956,15 @@ public final class Settings { public static final String NIGHT_DISPLAY_LAST_ACTIVATED_TIME = "night_display_last_activated_time"; /** * Control whether display white balance is currently enabled. * @hide */ public static final String DISPLAY_WHITE_BALANCE_ENABLED = "display_white_balance_enabled"; private static final Validator DISPLAY_WHITE_BALANCE_ENABLED_VALIDATOR = BOOLEAN_VALIDATOR; /** * Names of the service components that the current user has explicitly allowed to * be a VR mode listener, separated by ':'. Loading Loading @@ -8405,6 +8414,7 @@ public final class Settings { NIGHT_DISPLAY_CUSTOM_END_TIME, NIGHT_DISPLAY_COLOR_TEMPERATURE, NIGHT_DISPLAY_AUTO_MODE, DISPLAY_WHITE_BALANCE_ENABLED, SYNC_PARENT_SOUNDS, CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED, SWIPE_UP_TO_SWITCH_APPS_ENABLED, Loading Loading @@ -8552,6 +8562,7 @@ public final class Settings { VALIDATORS.put(NIGHT_DISPLAY_COLOR_TEMPERATURE, NIGHT_DISPLAY_COLOR_TEMPERATURE_VALIDATOR); VALIDATORS.put(NIGHT_DISPLAY_AUTO_MODE, NIGHT_DISPLAY_AUTO_MODE_VALIDATOR); VALIDATORS.put(DISPLAY_WHITE_BALANCE_ENABLED, DISPLAY_WHITE_BALANCE_ENABLED_VALIDATOR); VALIDATORS.put(SYNC_PARENT_SOUNDS, SYNC_PARENT_SOUNDS_VALIDATOR); VALIDATORS.put(CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED, CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED_VALIDATOR); Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -929,6 +929,9 @@ in hardware. --> <bool name="config_setColorTransformAccelerated">false</bool> <!-- Boolean indicating whether display white balance is supported. --> <bool name="config_displayWhiteBalanceAvailable">false</bool> <!-- Control whether Night display is available. This should only be enabled on devices that have a HWC implementation that can apply the matrix passed to setColorTransform without impacting power, performance, and app compatibility (e.g. protected content). --> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3028,6 +3028,7 @@ <java-symbol type="drawable" name="ic_doc_generic" /> <java-symbol type="bool" name="config_setColorTransformAccelerated" /> <java-symbol type="bool" name="config_displayWhiteBalanceAvailable" /> <java-symbol type="bool" name="config_nightDisplayAvailable" /> <java-symbol type="bool" name="config_allowDisablingAssistDisclosure" /> <java-symbol type="integer" name="config_defaultNightDisplayAutoMode" /> Loading services/core/java/com/android/server/display/ColorDisplayService.java +277 −97 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
core/java/android/hardware/display/ColorDisplayManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,13 @@ public final class ColorDisplayManager { return context.getResources().getBoolean(R.bool.config_nightDisplayAvailable); } /** * Returns {@code true} if display white balance is supported by the device. */ public static boolean isDisplayWhiteBalanceAvailable(Context context) { return context.getResources().getBoolean(R.bool.config_displayWhiteBalanceAvailable); } private static class ColorDisplayManagerInternal { private static ColorDisplayManagerInternal sInstance; Loading
core/java/android/provider/Settings.java +11 −0 Original line number Diff line number Diff line Loading @@ -7956,6 +7956,15 @@ public final class Settings { public static final String NIGHT_DISPLAY_LAST_ACTIVATED_TIME = "night_display_last_activated_time"; /** * Control whether display white balance is currently enabled. * @hide */ public static final String DISPLAY_WHITE_BALANCE_ENABLED = "display_white_balance_enabled"; private static final Validator DISPLAY_WHITE_BALANCE_ENABLED_VALIDATOR = BOOLEAN_VALIDATOR; /** * Names of the service components that the current user has explicitly allowed to * be a VR mode listener, separated by ':'. Loading Loading @@ -8405,6 +8414,7 @@ public final class Settings { NIGHT_DISPLAY_CUSTOM_END_TIME, NIGHT_DISPLAY_COLOR_TEMPERATURE, NIGHT_DISPLAY_AUTO_MODE, DISPLAY_WHITE_BALANCE_ENABLED, SYNC_PARENT_SOUNDS, CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED, SWIPE_UP_TO_SWITCH_APPS_ENABLED, Loading Loading @@ -8552,6 +8562,7 @@ public final class Settings { VALIDATORS.put(NIGHT_DISPLAY_COLOR_TEMPERATURE, NIGHT_DISPLAY_COLOR_TEMPERATURE_VALIDATOR); VALIDATORS.put(NIGHT_DISPLAY_AUTO_MODE, NIGHT_DISPLAY_AUTO_MODE_VALIDATOR); VALIDATORS.put(DISPLAY_WHITE_BALANCE_ENABLED, DISPLAY_WHITE_BALANCE_ENABLED_VALIDATOR); VALIDATORS.put(SYNC_PARENT_SOUNDS, SYNC_PARENT_SOUNDS_VALIDATOR); VALIDATORS.put(CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED, CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED_VALIDATOR); Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -929,6 +929,9 @@ in hardware. --> <bool name="config_setColorTransformAccelerated">false</bool> <!-- Boolean indicating whether display white balance is supported. --> <bool name="config_displayWhiteBalanceAvailable">false</bool> <!-- Control whether Night display is available. This should only be enabled on devices that have a HWC implementation that can apply the matrix passed to setColorTransform without impacting power, performance, and app compatibility (e.g. protected content). --> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3028,6 +3028,7 @@ <java-symbol type="drawable" name="ic_doc_generic" /> <java-symbol type="bool" name="config_setColorTransformAccelerated" /> <java-symbol type="bool" name="config_displayWhiteBalanceAvailable" /> <java-symbol type="bool" name="config_nightDisplayAvailable" /> <java-symbol type="bool" name="config_allowDisablingAssistDisclosure" /> <java-symbol type="integer" name="config_defaultNightDisplayAutoMode" /> Loading
services/core/java/com/android/server/display/ColorDisplayService.java +277 −97 File changed.Preview size limit exceeded, changes collapsed. Show changes