Fix SurfaceFlinger_test failed when display color mode changed

The screenshot will be used to verify if it contains the expected
colors in test cases. But the dataspace would depend on the color mode
of the display. And the captured screenshot could be different to the
native values and cause the test failed because it check the unexpected
color.

- Add 'useRGBColorSpace' in CaptureArgs to force capture screenshot in
  native rgb so we could use it to verify the expected color.
- getActiveConfig will return the id instead the status, we have to
  check the value if valid.

Bug: 166622214
Test: change color mode and run atest SurfaceFlinger_test
Change-Id: I2440e13f2ba0932b770158a11f2eab1903c77b30
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 3b0b392..20b83af 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -541,6 +541,7 @@
     SAFE_PARCEL(output.writeFloat, frameScale);
     SAFE_PARCEL(output.writeBool, captureSecureLayers);
     SAFE_PARCEL(output.writeInt32, uid);
+    SAFE_PARCEL(output.writeBool, useRGBColorSpace);
     return NO_ERROR;
 }
 
@@ -552,7 +553,7 @@
     SAFE_PARCEL(input.readFloat, &frameScale);
     SAFE_PARCEL(input.readBool, &captureSecureLayers);
     SAFE_PARCEL(input.readInt32, &uid);
-
+    SAFE_PARCEL(input.readBool, &useRGBColorSpace);
     return NO_ERROR;
 }