Make getBootDisplayModeSupport feature optional in aidl composer
Bug: 216113429
Test: m
Test: atest libsurfaceflinger_unittest
Test: atest libcompositionengine_test
Test: Tested manually on cuttlefish (target with APIs implemented)
Change-Id: Ia949a375aabc12896115e99d4d11ad6fe0d0cf87
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 2edc05b..92ee88d 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1086,7 +1086,8 @@
getHwComposer().supportsContentType(*displayId, hal::ContentType::GAME);
info->preferredBootDisplayMode = static_cast<ui::DisplayModeId>(-1);
- if (getHwComposer().getBootDisplayModeSupport()) {
+
+ if (getHwComposer().hasCapability(Capability::BOOT_DISPLAY_CONFIG)) {
if (const auto hwcId = getHwComposer().getPreferredBootDisplayMode(*displayId)) {
if (const auto modeId = display->translateModeId(*hwcId)) {
info->preferredBootDisplayMode = modeId->value();
@@ -1408,7 +1409,7 @@
status_t SurfaceFlinger::getBootDisplayModeSupport(bool* outSupport) const {
auto future = mScheduler->schedule([=]() MAIN_THREAD mutable -> status_t {
- *outSupport = getHwComposer().getBootDisplayModeSupport();
+ *outSupport = getHwComposer().hasCapability(Capability::BOOT_DISPLAY_CONFIG);
return NO_ERROR;
});
return future.get();