SF: Update forced composition color space along with color mode

Currently, a forced composition color space (ColorMode) can be set by
the device via a persistent property. However, this property is read
only during init, while some DisplayColorSetting values, which can
change during runtime, require a specific ColorMode to be set
simultaneously.

This change adds the ability to specify a ColorMode in the same binder
transaction that is used to set DisplayColorSetting. If a ColorMode is
unspecified during the transaction, the current forced ColorMode is
unchanged.

Bug: 137140317
Bug: 137053654
Change-Id: I35bb292fbe70f944f509f7d34ef965adb66ca059
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 6d9dc97..fe7a512 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -5405,7 +5405,12 @@
                 return NO_ERROR;
             }
             case 1023: { // Set native mode
+                int32_t colorMode;
+
                 mDisplayColorSetting = static_cast<DisplayColorSetting>(data.readInt32());
+                if (data.readInt32(&colorMode) == NO_ERROR) {
+                    mForceColorMode = static_cast<ColorMode>(colorMode);
+                }
                 invalidateHwcGeometry();
                 repaintEverything();
                 return NO_ERROR;