Update native getDisplayDecorationSupport API
I27f119f927b23052c5fd8f068cbca75338fe7b91 adds new HAL APIs which
provide more detailed info regarding DISPLAY_DECORATION support. Call
the new API and plumb it up to SurfaceComposerClient.
Remove reference to old DisplayCapability.DISPLAY_DECORATION.
Bug: 216644902
Test: manual
Change-Id: I961051c0a660b596039ac04b546040764ee20d34
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 91b2fb1..ea73c6d 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -52,6 +52,7 @@
namespace android {
+using aidl::android::hardware::graphics::common::DisplayDecorationSupport;
using gui::FocusRequest;
using gui::IRegionSamplingListener;
using gui::WindowInfo;
@@ -2239,8 +2240,9 @@
lightRadius);
}
-bool SurfaceComposerClient::getDisplayDecorationSupport(const sp<IBinder>& displayToken) {
- bool support = false;
+std::optional<DisplayDecorationSupport> SurfaceComposerClient::getDisplayDecorationSupport(
+ const sp<IBinder>& displayToken) {
+ std::optional<DisplayDecorationSupport> support;
ComposerService::getComposerService()->getDisplayDecorationSupport(displayToken, &support);
return support;
}