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

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

Merge "Add config value for a11y color mode" into qt-dev

parents 31e7bbcc b8d03a54
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1110,6 +1110,11 @@
        -->
    </integer-array>

    <!-- 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. -->
    <integer name="config_accessibilityColorMode">-1</integer>

    <!-- Indicate whether to allow the device to suspend when the screen is off
         due to the proximity sensor.  This resource should only be set to true
         if the sensor HAL correctly handles the proximity sensor as a wake-up source.
+1 −0
Original line number Diff line number Diff line
@@ -3186,6 +3186,7 @@
  <java-symbol type="array" name="config_nightDisplayColorTemperatureCoefficients" />
  <java-symbol type="array" name="config_nightDisplayColorTemperatureCoefficientsNative" />
  <java-symbol type="array" name="config_availableColorModes" />
  <java-symbol type="integer" name="config_accessibilityColorMode" />
  <java-symbol type="bool" name="config_displayWhiteBalanceAvailable" />
  <java-symbol type="bool" name="config_displayWhiteBalanceEnabledDefault" />
  <java-symbol type="integer" name="config_displayWhiteBalanceColorTemperatureMin" />
+4 −4
Original line number Diff line number Diff line
@@ -775,10 +775,10 @@ public final class ColorDisplayService extends SystemService {
        final ContentResolver cr = getContext().getContentResolver();
        if (isAccessibilityEnabled()) {
            // There are restrictions on the available color modes combined with a11y transforms.
            if (isColorModeAvailable(COLOR_MODE_SATURATED)) {
                return COLOR_MODE_SATURATED;
            } else if (isColorModeAvailable(COLOR_MODE_AUTOMATIC)) {
                return COLOR_MODE_AUTOMATIC;
            final int a11yColorMode = getContext().getResources().getInteger(
                    R.integer.config_accessibilityColorMode);
            if (a11yColorMode >= 0) {
                return a11yColorMode;
            }
        }