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

Commit 8d8ee565 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[Settings] Add strings for Natural and Automatic color modes" into pi-dev

parents 2e32d302 504cc266
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2461,6 +2461,12 @@
    <string name="color_mode_option_boosted">Boosted</string>
    <!-- Display settings screen, Color mode option for "Saturated color"  [CHAR LIMIT=45] -->
    <string name="color_mode_option_saturated">Saturated</string>
    <!-- Display settings screen, Color mode option for "Automatic color"  [CHAR LIMIT=45] -->
    <string name="color_mode_option_automatic">Automatic</string>
    <!-- Display settings screen, "natural(sRGB) color" setting option summary [CHAR LIMIT=NONE] -->
    <string name="color_mode_summary_natural">Use accurate colors only</string>
    <!-- Display settings screen, "Automatic color" setting option summary [CHAR LIMIT=NONE] -->
    <string name="color_mode_summary_automatic">Adjust between vivid and accurate colors</string>
    <!-- Sound & display settings screen, accelerometer-based rotation summary text when check box is selected -->
    <string name="accelerometer_summary_on" product="tablet">Switch orientation automatically when rotating tablet</string>
+6 −1
Original line number Diff line number Diff line
@@ -38,6 +38,9 @@ public class ColorModePreferenceFragment extends RadioButtonPickerFragment {
    static final String KEY_COLOR_MODE_BOOSTED = "color_mode_boosted";
    @VisibleForTesting
    static final String KEY_COLOR_MODE_SATURATED = "color_mode_saturated";
    // TODO have a real key for "automatic" rather than just re-using "saturated"
    @VisibleForTesting
    static final String KEY_COLOR_MODE_AUTOMATIC = "color_mode_saturated";

    private ColorDisplayController mController;

@@ -74,7 +77,9 @@ public class ColorModePreferenceFragment extends RadioButtonPickerFragment {
            new ColorModeCandidateInfo(c.getString(R.string.color_mode_option_boosted),
                    KEY_COLOR_MODE_BOOSTED),
            new ColorModeCandidateInfo(c.getString(R.string.color_mode_option_saturated),
                    KEY_COLOR_MODE_SATURATED)
                    KEY_COLOR_MODE_SATURATED),
            new ColorModeCandidateInfo(c.getString(R.string.color_mode_option_automatic),
                    KEY_COLOR_MODE_AUTOMATIC)
        );
    }

+3 −1
Original line number Diff line number Diff line
@@ -73,13 +73,15 @@ public class ColorModePreferenceFragmentTest {
        when(mFragment.getContext()).thenReturn(RuntimeEnvironment.application);
        List<? extends CandidateInfo> candidates = mFragment.getCandidates();

        assertThat(candidates.size()).isEqualTo(3);
        assertThat(candidates.size()).isEqualTo(4);
        assertThat(candidates.get(0).getKey())
                .isEqualTo(ColorModePreferenceFragment.KEY_COLOR_MODE_NATURAL);
        assertThat(candidates.get(1).getKey())
                .isEqualTo(ColorModePreferenceFragment.KEY_COLOR_MODE_BOOSTED);
        assertThat(candidates.get(2).getKey())
                .isEqualTo(ColorModePreferenceFragment.KEY_COLOR_MODE_SATURATED);
        assertThat(candidates.get(3).getKey())
                .isEqualTo(ColorModePreferenceFragment.KEY_COLOR_MODE_AUTOMATIC);
    }

    @Test