SF: Store DeviceProductInfo in DisplayDeviceState
After a hotplug we store DeviceProductInfo in
DisplayDeviceState, so it can be used later without calling
into HardwareComposer and parsing the EDID.
Bug: 149075047
Test: atest libsurfaceflinger_unittest
Test: 1. flash a device
2. boot a device connected to a display
3. Check for sensible DeviceProductInfo:
adb shell dumpsys SurfaceFlinger | grep deviceProductInfo
adb shell dumpsys display | grep deviceProductInfo
4. reboot without a display
5. Check that DeviceProductInfo is empty / null in
adb shell dumpsys SurfaceFlinger | grep deviceProductInfo
adb shell dumpsys display | grep deviceProductInfo
Change-Id: Ide3354c1779c2ced88954c7b50e5500568d8482b
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index 5a5bbe6..a35cada 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -192,7 +192,7 @@
DisplayId id;
DisplayConnectionType type;
hardware::graphics::composer::hal::HWDisplayId hwcDisplayId;
-
+ std::optional<DeviceProductInfo> deviceProductInfo;
bool operator==(const Physical& other) const {
return id == other.id && type == other.type && hwcDisplayId == other.hwcDisplayId;
}