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

Commit bae1b24b authored by Courtney Goeltzenleuchter's avatar Courtney Goeltzenleuchter
Browse files

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
parent f424c3fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
        }
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ public class PictureColorModePreferenceController extends

    @VisibleForTesting
    boolean isWideColorGamut() {
        return mContext.getDisplay().isWideColorGamut();
        return mContext.getResources().getConfiguration().isScreenWideColorGamut();
    }

    @VisibleForTesting