[Settings] Add strings for Natural and Automatic color modes
These strings are not properly reflected in the UI yet. Automatic and
Saturated currently map to the same display setting (and the UI reflects
this by checking both).
Bug: 75982435
Test: Modified the existing testcases to reflect the new string.
Change-Id: Iaef08599c0233e018eaafaf89d60eab92e102782
(cherry picked from commit e8f9bf5f68
)
This commit is contained in:
@@ -2441,6 +2441,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>
|
||||
|
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user