Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8f6e92f authored by Christine Franks's avatar Christine Franks Committed by Android (Google) Code Review
Browse files

Merge "Add configurable mapping between color modes"

parents 0c38b48c b7763138
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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.
     *
+9 −0
Original line number Diff line number Diff line
@@ -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.
         *
@@ -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);
        }
        /**
+15 −0
Original line number Diff line number Diff line
@@ -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. -->
+2 −0
Original line number Diff line number Diff line
@@ -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" />
+1 −0
Original line number Diff line number Diff line
@@ -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