SF: Clean up plumbing for boot display mode
Avoid CE round trip, and validate API against virtual displays.
Bug: 182939859
Test: Boot
Change-Id: Ic4e14dcc06218097c65f9374f2962a345d347820
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 02b3772..7b9ffed 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -814,10 +814,11 @@
}
status_t HWComposer::getSupportedContentTypes(
- PhysicalDisplayId displayId, std::vector<hal::ContentType>* outSupportedContentTypes) {
+ PhysicalDisplayId displayId,
+ std::vector<hal::ContentType>* outSupportedContentTypes) const {
RETURN_IF_INVALID_DISPLAY(displayId, BAD_INDEX);
- const auto error =
- mDisplayData[displayId].hwcDisplay->getSupportedContentTypes(outSupportedContentTypes);
+ const auto error = mDisplayData.at(displayId).hwcDisplay->getSupportedContentTypes(
+ outSupportedContentTypes);
RETURN_IF_HWC_ERROR(error, displayId, UNKNOWN_ERROR);