Check system support of wide-color
getContext().getDisplay().isWideColorGamut() does not check system support of wide-color. That's window.isWideColor(). No window object handy so call isScreenWideColorGamut() to verify system support for wide-color as well. Bug: 64801219 Bug: 67488442 Test: manual, check Developer Settings for Color Mode option on Pixel or Pixel XL. Change-Id: If28e52da174dd460850bc84744818979f52add78
This commit is contained in:
@@ -545,7 +545,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
||||
mColorModePreference = (ColorModePreference) findPreference(KEY_COLOR_MODE);
|
||||
mColorModePreference.updateCurrentAndSupported();
|
||||
if (mColorModePreference.getColorModeCount() < 2 ||
|
||||
getContext().getDisplay().isWideColorGamut()) {
|
||||
getContext().getResources().getConfiguration().isScreenWideColorGamut()) {
|
||||
removePreference(KEY_COLOR_MODE);
|
||||
mColorModePreference = null;
|
||||
}
|
||||
|
@@ -91,7 +91,7 @@ public class PictureColorModePreferenceController extends
|
||||
|
||||
@VisibleForTesting
|
||||
boolean isWideColorGamut() {
|
||||
return mContext.getDisplay().isWideColorGamut();
|
||||
return mContext.getResources().getConfiguration().isScreenWideColorGamut();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
Reference in New Issue
Block a user