ISurfaceComposer: rename isColorManagementUsed()

Rename isColorManagementUsed() to getColorManagement()
to follow the convention in ISurfaceComposer.

Test: adb shell /data/nativetest64/SurfaceFlinger_test/SurfaceFlinger_test --gtest_filter=LayerTransactionTest.SetColorTransformBasic
Change-Id: I63f75a98dbd230375f215a109a725672353eceef
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index e66c0e5..accf72c 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -588,19 +588,16 @@
         return error;
     }
 
-    virtual bool isColorManagementUsed() const {
+    virtual status_t getColorManagement(bool* outGetColorManagement) const {
         Parcel data, reply;
         data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
-        remote()->transact(BnSurfaceComposer::IS_COLOR_MANAGEMET_USED, data, &reply);
-        int32_t result = 0;
-        status_t err = reply.readInt32(&result);
-        if (err != NO_ERROR) {
-            ALOGE("ISurfaceComposer::isColorManagementUsed: error "
-                  "retrieving result: %s (%d)",
-                  strerror(-err), -err);
-            return false;
+        remote()->transact(BnSurfaceComposer::GET_COLOR_MANAGEMENT, data, &reply);
+        bool result;
+        status_t err = reply.readBool(&result);
+        if (err == NO_ERROR) {
+            *outGetColorManagement = result;
         }
-        return result != 0;
+        return err;
     }
 };
 
@@ -945,11 +942,14 @@
             }
             return NO_ERROR;
         }
-        case IS_COLOR_MANAGEMET_USED: {
+        case GET_COLOR_MANAGEMENT: {
             CHECK_INTERFACE(ISurfaceComposer, data, reply);
-            int32_t result = isColorManagementUsed() ? 1 : 0;
-            reply->writeInt32(result);
-            return NO_ERROR;
+            bool result;
+            status_t error = getColorManagement(&result);
+            if (error == NO_ERROR) {
+                reply->writeBool(result);
+            }
+            return result;
         }
         default: {
             return BBinder::onTransact(code, data, reply, flags);
diff --git a/libs/gui/include/gui/ISurfaceComposer.h b/libs/gui/include/gui/ISurfaceComposer.h
index 9316ae6..761f31a 100644
--- a/libs/gui/include/gui/ISurfaceComposer.h
+++ b/libs/gui/include/gui/ISurfaceComposer.h
@@ -280,7 +280,7 @@
      */
     virtual status_t getLayerDebugInfo(std::vector<LayerDebugInfo>* outLayers) const = 0;
 
-    virtual bool isColorManagementUsed() const = 0;
+    virtual status_t getColorManagement(bool* outGetColorManagement) const = 0;
 
     /* Gets the composition preference of the default data space and default pixel format,
      * as well as the wide color gamut data space and wide color gamut pixel format.
@@ -331,7 +331,7 @@
         GET_LAYER_DEBUG_INFO,
         CREATE_SCOPED_CONNECTION,
         GET_COMPOSITION_PREFERENCE,
-        IS_COLOR_MANAGEMET_USED,
+        GET_COLOR_MANAGEMENT,
     };
 
     virtual status_t onTransact(uint32_t code, const Parcel& data,
diff --git a/libs/gui/tests/Surface_test.cpp b/libs/gui/tests/Surface_test.cpp
index a3e9249..d0600da 100644
--- a/libs/gui/tests/Surface_test.cpp
+++ b/libs/gui/tests/Surface_test.cpp
@@ -635,7 +635,7 @@
         return NO_ERROR;
     }
 
-    virtual bool isColorManagementUsed() const { return false; }
+    virtual status_t getColorManagement(bool* /*outGetColorManagement*/) const { return NO_ERROR; }
 
 protected:
     IBinder* onAsBinder() override { return nullptr; }