From 37965d4d225e333b70110c5715998eebed5eedd2 Mon Sep 17 00:00:00 2001 From: Ady Abraham Date: Thu, 1 Nov 2018 13:43:32 -0700 Subject: 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 --- libs/gui/ISurfaceComposer.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'libs/gui/ISurfaceComposer.cpp') diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp index e66c0e5dd6..accf72c390 100644 --- a/libs/gui/ISurfaceComposer.cpp +++ b/libs/gui/ISurfaceComposer.cpp @@ -588,19 +588,16 @@ public: 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 @@ status_t BnSurfaceComposer::onTransact( } 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); -- cgit v1.2.3-59-g8ed1b