Loading core/java/android/hardware/display/ColorDisplayManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -356,6 +356,18 @@ public final class ColorDisplayManager { return mManager.getColorMode(); } /** * Returns whether the specified color mode is part of the standard set. * * @hide */ public static boolean isStandardColorMode(int mode) { return mode == ColorDisplayManager.COLOR_MODE_NATURAL || mode == ColorDisplayManager.COLOR_MODE_BOOSTED || mode == ColorDisplayManager.COLOR_MODE_SATURATED || mode == ColorDisplayManager.COLOR_MODE_AUTOMATIC; } /** * Returns whether the device has a wide color gamut display. * Loading core/java/android/provider/Settings.java +9 −0 Original line number Diff line number Diff line Loading @@ -3985,6 +3985,14 @@ public final class Settings { */ public static final String DISPLAY_COLOR_MODE = "display_color_mode"; /** * Hint to decide whether restored vendor color modes are compatible with the new device. If * unset or a match is not made, only the standard color modes will be restored. * @hide */ public static final String DISPLAY_COLOR_MODE_VENDOR_HINT = "display_color_mode_vendor_hint"; /** * The user selected min refresh rate in frames per second. * Loading Loading @@ -4943,6 +4951,7 @@ public final class Settings { PRIVATE_SETTINGS.add(EGG_MODE); PRIVATE_SETTINGS.add(SHOW_BATTERY_PERCENT); PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE); PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE_VENDOR_HINT); } /** Loading core/res/res/values/config.xml +15 −0 Original line number Diff line number Diff line Loading @@ -898,6 +898,21 @@ --> </integer-array> <!-- Mapping for default ColorDisplayManager.COLOR_MODE_xxx to other color modes, if if applicable. By default, all map to the same value. --> <integer-array name="config_mappedColorModes"> <item>0</item> <!-- COLOR_MODE_NATURAL --> <item>1</item> <!-- COLOR_MODE_BOOSTED --> <item>2</item> <!-- COLOR_MODE_SATURATED --> <item>3</item> <!-- COLOR_MODE_AUTOMATIC --> </integer-array> <!-- Hint to decide whether restored vendor color modes are compatible with the new device. If unset or a match is not made, only the standard color modes will be restored. If set, it should be a unique identifier for the kinds of vendor modes this device supports, such as a manufacturer name. --> <string name="config_vendorColorModesRestoreHint" translatable="false"></string> <!-- Color mode to use when accessibility transforms are enabled. This color mode must be supported by the device, but not necessarily appear in config_availableColorModes. The regularly selected color mode will be used if this value is negative. --> Loading core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3194,6 +3194,8 @@ <java-symbol type="array" name="config_reduceBrightColorsCoefficients" /> <java-symbol type="array" name="config_reduceBrightColorsCoefficientsNative" /> <java-symbol type="array" name="config_availableColorModes" /> <java-symbol type="array" name="config_mappedColorModes" /> <java-symbol type="string" name="config_vendorColorModesRestoreHint" /> <java-symbol type="integer" name="config_accessibilityColorMode" /> <java-symbol type="array" name="config_displayCompositionColorModes" /> <java-symbol type="array" name="config_displayCompositionColorSpaces" /> Loading packages/SettingsProvider/src/android/provider/settings/backup/SystemSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ public class SystemSettings { Settings.System.NOTIFICATION_VIBRATION_INTENSITY, Settings.System.RING_VIBRATION_INTENSITY, Settings.System.HAPTIC_FEEDBACK_INTENSITY, Settings.System.DISPLAY_COLOR_MODE_VENDOR_HINT, // must precede DISPLAY_COLOR_MODE Settings.System.DISPLAY_COLOR_MODE, Settings.System.ALARM_ALERT, Settings.System.NOTIFICATION_LIGHT_PULSE, Loading Loading
core/java/android/hardware/display/ColorDisplayManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -356,6 +356,18 @@ public final class ColorDisplayManager { return mManager.getColorMode(); } /** * Returns whether the specified color mode is part of the standard set. * * @hide */ public static boolean isStandardColorMode(int mode) { return mode == ColorDisplayManager.COLOR_MODE_NATURAL || mode == ColorDisplayManager.COLOR_MODE_BOOSTED || mode == ColorDisplayManager.COLOR_MODE_SATURATED || mode == ColorDisplayManager.COLOR_MODE_AUTOMATIC; } /** * Returns whether the device has a wide color gamut display. * Loading
core/java/android/provider/Settings.java +9 −0 Original line number Diff line number Diff line Loading @@ -3985,6 +3985,14 @@ public final class Settings { */ public static final String DISPLAY_COLOR_MODE = "display_color_mode"; /** * Hint to decide whether restored vendor color modes are compatible with the new device. If * unset or a match is not made, only the standard color modes will be restored. * @hide */ public static final String DISPLAY_COLOR_MODE_VENDOR_HINT = "display_color_mode_vendor_hint"; /** * The user selected min refresh rate in frames per second. * Loading Loading @@ -4943,6 +4951,7 @@ public final class Settings { PRIVATE_SETTINGS.add(EGG_MODE); PRIVATE_SETTINGS.add(SHOW_BATTERY_PERCENT); PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE); PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE_VENDOR_HINT); } /** Loading
core/res/res/values/config.xml +15 −0 Original line number Diff line number Diff line Loading @@ -898,6 +898,21 @@ --> </integer-array> <!-- Mapping for default ColorDisplayManager.COLOR_MODE_xxx to other color modes, if if applicable. By default, all map to the same value. --> <integer-array name="config_mappedColorModes"> <item>0</item> <!-- COLOR_MODE_NATURAL --> <item>1</item> <!-- COLOR_MODE_BOOSTED --> <item>2</item> <!-- COLOR_MODE_SATURATED --> <item>3</item> <!-- COLOR_MODE_AUTOMATIC --> </integer-array> <!-- Hint to decide whether restored vendor color modes are compatible with the new device. If unset or a match is not made, only the standard color modes will be restored. If set, it should be a unique identifier for the kinds of vendor modes this device supports, such as a manufacturer name. --> <string name="config_vendorColorModesRestoreHint" translatable="false"></string> <!-- Color mode to use when accessibility transforms are enabled. This color mode must be supported by the device, but not necessarily appear in config_availableColorModes. The regularly selected color mode will be used if this value is negative. --> Loading
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3194,6 +3194,8 @@ <java-symbol type="array" name="config_reduceBrightColorsCoefficients" /> <java-symbol type="array" name="config_reduceBrightColorsCoefficientsNative" /> <java-symbol type="array" name="config_availableColorModes" /> <java-symbol type="array" name="config_mappedColorModes" /> <java-symbol type="string" name="config_vendorColorModesRestoreHint" /> <java-symbol type="integer" name="config_accessibilityColorMode" /> <java-symbol type="array" name="config_displayCompositionColorModes" /> <java-symbol type="array" name="config_displayCompositionColorSpaces" /> Loading
packages/SettingsProvider/src/android/provider/settings/backup/SystemSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ public class SystemSettings { Settings.System.NOTIFICATION_VIBRATION_INTENSITY, Settings.System.RING_VIBRATION_INTENSITY, Settings.System.HAPTIC_FEEDBACK_INTENSITY, Settings.System.DISPLAY_COLOR_MODE_VENDOR_HINT, // must precede DISPLAY_COLOR_MODE Settings.System.DISPLAY_COLOR_MODE, Settings.System.ALARM_ALERT, Settings.System.NOTIFICATION_LIGHT_PULSE, Loading