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

Commit af5e1124 authored by Romain Guy's avatar Romain Guy Committed by Chia-I Wu
Browse files

Add color mode setting

The new setting appears on devices that support color management
and wide color gamut rendering. The setting allows the user to
choose between natural (sRGB), boosted (sRGB + 10% saturation)
and saturated (unmanaged colors; colors are remapped to the device's
native gamut).

This change adds a metric constant for analytics in Settings
and uses a persistent system property to know when to suppress
color management.

Bug: 68159303
Test: manual
Merged-In: I83cc972fc3a2290ff106eae0e76a3ee799503813
Change-Id: I83cc972fc3a2290ff106eae0e76a3ee799503813
(cherry picked from commit 62e8c175)
parent 25c008d9
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -4219,6 +4219,11 @@ message MetricsEvent {
    // OS: O DR
    // OS: O DR
    TRAMPOLINE_SETTINGS_EVENT = 1033;
    TRAMPOLINE_SETTINGS_EVENT = 1033;


    // OPEN: Settings > Display > Colors
    // CATEGORY: SETTINGS
    // OS: O MR (backported for O DR)
    COLOR_MODE_SETTINGS = 1143;

    // ---- End O-DR1 Constants, all O-DR1 constants go above this line ----
    // ---- End O-DR1 Constants, all O-DR1 constants go above this line ----


    // Add new aosp constants above this line.
    // Add new aosp constants above this line.
+2 −1
Original line number Original line Diff line number Diff line
@@ -7670,7 +7670,8 @@ public class WindowManagerService extends IWindowManager.Stub
    }
    }


    boolean hasWideColorGamutSupport() {
    boolean hasWideColorGamutSupport() {
        return mHasWideColorGamutSupport;
        return mHasWideColorGamutSupport &&
                !SystemProperties.getBoolean("persist.sys.sf.native_mode", false);
    }
    }


    void updateNonSystemOverlayWindowsVisibilityIfNeeded(WindowState win, boolean surfaceShown) {
    void updateNonSystemOverlayWindowsVisibilityIfNeeded(WindowState win, boolean surfaceShown) {