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

Commit b60de846 authored by Sally Yuen's avatar Sally Yuen Committed by Android (Google) Code Review
Browse files

Merge "Set min, max, and default RBC strength values" into sc-dev

parents e617b311 c943ce1a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -830,13 +830,13 @@
    </string-array>

    <!-- Default strength, in percentage, of bright color reduction when activated. -->
    <integer name="config_reduceBrightColorsStrengthDefault">0</integer>
    <integer name="config_reduceBrightColorsStrengthDefault">50</integer>

    <!-- Minimum strength, in percentage, supported by bright color reduction. -->
    <integer name="config_reduceBrightColorsStrengthMin">0</integer>
    <integer name="config_reduceBrightColorsStrengthMin">25</integer>

    <!-- Maximum strength, in percentage, supported by bright color reduction. -->
    <integer name="config_reduceBrightColorsStrengthMax">100</integer>
    <integer name="config_reduceBrightColorsStrengthMax">90</integer>

    <!-- Boolean indicating whether display white balance is supported. -->
    <bool name="config_displayWhiteBalanceAvailable">false</bool>
+6 −2
Original line number Diff line number Diff line
@@ -630,8 +630,12 @@ public final class ColorDisplayService extends SystemService {
        if (mCurrentUser == UserHandle.USER_NULL) {
            return;
        }
        final int strength = Secure.getIntForUser(getContext().getContentResolver(),
                Secure.REDUCE_BRIGHT_COLORS_LEVEL, 0, mCurrentUser);
        int strength = Secure.getIntForUser(getContext().getContentResolver(),
                Secure.REDUCE_BRIGHT_COLORS_LEVEL, NOT_SET, mCurrentUser);
        if (strength == NOT_SET) {
            strength = getContext().getResources().getInteger(
                    R.integer.config_reduceBrightColorsStrengthDefault);
        }
        mReduceBrightColorsTintController.setMatrix(strength);
        if (mReduceBrightColorsListener != null) {
            mReduceBrightColorsListener.onReduceBrightColorsStrengthChanged(strength);