From 89d7270dcd13d6ef05c8f7f5cc4cc1660825410a Mon Sep 17 00:00:00 2001 From: Ady Abraham Date: Fri, 18 Feb 2022 17:04:55 -0800 Subject: [PATCH] composer: remove IComposer.dumpDebugInfo aidl already have a dump funciton, so there is no need to expose a custom dumpDebugInfo from IComposer. Bug: 220171623 Test: atest VtsHalGraphicsComposer3_TargetTest Test: adb shell dumpsys SurfaceFlinger Test: adb shell dumpsys android.hardware.graphics.composer3.IComposer/default Change-Id: I5036193c06ba9fdd8aa5f79cd756541d9edc146c --- .../hardware/graphics/composer3/IComposer.aidl | 1 - .../hardware/graphics/composer3/IComposer.aidl | 8 -------- .../vts/functional/composer-vts/VtsComposerClient.cpp | 11 +++++++++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposer.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposer.aidl index 9abc6083e2..21b9ad88cd 100644 --- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposer.aidl +++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposer.aidl @@ -35,7 +35,6 @@ package android.hardware.graphics.composer3; @VintfStability interface IComposer { android.hardware.graphics.composer3.IComposerClient createClient(); - String dumpDebugInfo(); android.hardware.graphics.composer3.Capability[] getCapabilities(); const int EX_NO_RESOURCES = 6; } diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl index b8edd8071d..0ebc2b7c0c 100644 --- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl +++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl @@ -35,14 +35,6 @@ interface IComposer { */ IComposerClient createClient(); - /** - * Retrieves implementation-defined debug information, which will be - * displayed during, for example, `dumpsys SurfaceFlinger`. - * - * @return is a string of debug information. - */ - String dumpDebugInfo(); - /** * Provides a list of supported capabilities (as described in the * definition of Capability above). This list must not change after diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/composer-vts/VtsComposerClient.cpp b/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/composer-vts/VtsComposerClient.cpp index b3b10d0092..468a69ddf4 100644 --- a/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/composer-vts/VtsComposerClient.cpp +++ b/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/composer-vts/VtsComposerClient.cpp @@ -173,8 +173,15 @@ std::pair> VtsComposerClient::getD } ScopedAStatus VtsComposerClient::dumpDebugInfo() { - std::string debugInfo; - return mComposer->dumpDebugInfo(&debugInfo); + int pipefds[2]; + if (pipe(pipefds) < 0) { + return ScopedAStatus::fromServiceSpecificError(IComposer::EX_NO_RESOURCES); + } + + const auto status = mComposer->dump(pipefds[1], /*args*/ nullptr, /*numArgs*/ 0); + close(pipefds[0]); + close(pipefds[1]); + return ScopedAStatus::fromStatus(status); } std::pair VtsComposerClient::getDisplayIdentificationData(