Default dataspace must be UNKNOWN for compatibility

The first iteration of getColorSpaceAttribute would
cause the dataSpace to become HAL_DATASPACE_SRGB_LINEAR.
While technically correct, that's not what applications
are expecting. This change makes sure that we only
change the default if the application specifically asked
for the change. That keeps us backward compatible
behavior-wise.
Test: logcat and verify that we do not see SRGB_LINEAR
Bug: 37946330

Change-Id: I3265f53d2ff431405e7cf40e04e8422a63afeb62
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 7c4bdf9..27a45e0 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -505,9 +505,11 @@
                 if (!found) {
                     return false;
                 }
+                // Only change the dataSpace from default if the application
+                // has explicitly set the color space with a EGL_GL_COLORSPACE_KHR attribute.
+                dataSpace = modifyBufferDataspace(dataSpace, colorSpace);
             }
         }
-        dataSpace = modifyBufferDataspace(dataSpace, colorSpace);
     }
     return true;
 }