SF: Move getDisplayIdentificationData to HWC2::Device
The hotplug callback will query it before HWC2::Display creation.
Bug: 74619554
Test: Build
Change-Id: Ib2f8c04cf40274cb4e6f30cd737286ede5010e23
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 1118eeb..ebae006 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -98,12 +98,7 @@
bool HWComposer::getDisplayIdentificationData(hwc2_display_t hwcDisplayId, uint8_t* outPort,
DisplayIdentificationData* outData) const {
- HWC2::Display* display = mHwcDevice->getDisplayById(hwcDisplayId);
- if (!display) {
- ALOGE("%s: Attempted to access invalid display %" PRIu64, __FUNCTION__, hwcDisplayId);
- return false;
- }
- const auto error = display->getIdentificationData(outPort, outData);
+ const auto error = mHwcDevice->getDisplayIdentificationData(hwcDisplayId, outPort, outData);
if (error != HWC2::Error::None) {
ALOGE("%s failed for display %" PRIu64, __FUNCTION__, hwcDisplayId);
return false;