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

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

Merge "Add config for display white balance default state" into qt-dev

parents 1114046a 18ac4e25
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1031,6 +1031,9 @@
    <!-- Boolean indicating whether display white balance is supported. -->
    <bool name="config_displayWhiteBalanceAvailable">false</bool>

    <!-- Boolean indicating whether display white balance should be enabled by default. -->
    <bool name="config_displayWhiteBalanceEnabledDefault">false</bool>

    <!-- Minimum color temperature, in Kelvin, supported by display white balance. -->
    <integer name="config_displayWhiteBalanceColorTemperatureMin">4000</integer>

+1 −2
Original line number Diff line number Diff line
@@ -3150,7 +3150,6 @@

  <java-symbol type="bool" name="config_setColorTransformAccelerated" />
  <java-symbol type="bool" name="config_setColorTransformAcceleratedPerLayer" />
  <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" />
@@ -3162,8 +3161,8 @@
  <java-symbol type="array" name="config_nightDisplayColorTemperatureCoefficients" />
  <java-symbol type="array" name="config_nightDisplayColorTemperatureCoefficientsNative" />
  <java-symbol type="array" name="config_availableColorModes" />

  <java-symbol type="bool" name="config_displayWhiteBalanceAvailable" />
  <java-symbol type="bool" name="config_displayWhiteBalanceEnabledDefault" />
  <java-symbol type="integer" name="config_displayWhiteBalanceColorTemperatureMin" />
  <java-symbol type="integer" name="config_displayWhiteBalanceColorTemperatureMax" />
  <java-symbol type="integer" name="config_displayWhiteBalanceColorTemperatureDefault" />
+8 −2
Original line number Diff line number Diff line
@@ -461,7 +461,9 @@ public final class ColorDisplayService extends SystemService {
                    .setMatrix(mNightDisplayTintController.getColorTemperatureSetting());
        }

        if (mDisplayWhiteBalanceTintController.isAvailable(getContext())) {
            updateDisplayWhiteBalanceStatus();
        }

        final DisplayTransformManager dtm = getLocalService(DisplayTransformManager.class);
        dtm.setColorMode(mode, mNightDisplayTintController.getMatrix());
@@ -624,7 +626,11 @@ public final class ColorDisplayService extends SystemService {
            return false;
        }
        return Secure.getIntForUser(getContext().getContentResolver(),
                Secure.DISPLAY_WHITE_BALANCE_ENABLED, 0, mCurrentUser) == 1;
                Secure.DISPLAY_WHITE_BALANCE_ENABLED,
                getContext().getResources()
                        .getBoolean(R.bool.config_displayWhiteBalanceEnabledDefault) ? 1
                        : 0,
                mCurrentUser) == 1;
    }

    private boolean isDeviceColorManagedInternal() {