OSDN Git Service

Add new color mode setting
authorRomain Guy <romainguy@google.com>
Tue, 24 Oct 2017 20:59:40 +0000 (21:59 +0100)
committerRomain Guy <romainguy@google.com>
Tue, 24 Oct 2017 21:19:09 +0000 (22:19 +0100)
commit05fa18f8474cd5fed798e7ee7ef099682c4a4475
tree9f190fce449bb97c4b8f349e515f6b681a5eeb08
parentdd8e66fa202f9b351c7be174c81df63adb1767e2
Add new color mode setting

Replace the "vivid" mode setting with a new 3 choice screen:
- Natural (sRGB)
- Boosted (sRGB + 10% saturation)
- Saturated (unmanaged, colors are assigned the native color space)

The "Colors" setting that replaces "Vivid" only appears on devices
that support wide gamut rendering and color management. Changing
the color mode has an immediate effect and triggers a configuration
change in running application so that applications that request
wide color gamut rendering can react properly (since they lose
that ability).

Bug: 68159303
Test: make RunSettingsRoboTests
Change-Id: I7009723e11ee164c93719f0e42fed9d1b3cf6e01
res/xml/display_settings.xml
src/com/android/settings/display/ColorModePreferenceController.java
src/com/android/settings/display/ColorModePreferenceFragment.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/display/ColorModePreferenceControllerTest.java [deleted file]
tests/robotests/src/com/android/settings/display/ColorModePreferenceFragmentTest.java [new file with mode: 0644]