[SF] Update DeviceProductInfo on hotplug reconnect
This change populates DeviceProductInfo on hotplug, even if we are
in legacy multi-display mode. This behaviour is guarded by sysprop
ro.surface_flinger.update_edid_on_hotplug_reconnect which is
turned off by default.
Bug: 160952291
Test: 1. connect display
2. adb shell dumpsys SurfaceFlinger | grep deviceProductInfo
3. connect different display
4. adb shell dumpsys SurfaceFlinger | grep deviceProductInfo
5. make sure DeviceProductInfo has changed.
Change-Id: I94751f678b1dd1196727ad38ab5e398fb6cf0393
diff --git a/services/surfaceflinger/CompositionEngine/tests/MockHWComposer.h b/services/surfaceflinger/CompositionEngine/tests/MockHWComposer.h
index b5cda68..84c027b 100644
--- a/services/surfaceflinger/CompositionEngine/tests/MockHWComposer.h
+++ b/services/surfaceflinger/CompositionEngine/tests/MockHWComposer.h
@@ -81,6 +81,7 @@
MOCK_METHOD2(onHotplug,
std::optional<DisplayIdentificationInfo>(hal::HWDisplayId, hal::Connection));
+ MOCK_CONST_METHOD0(updatesDeviceProductInfoOnHotplugReconnect, bool());
MOCK_METHOD2(onVsync, bool(hal::HWDisplayId, int64_t));
MOCK_METHOD2(setVsyncEnabled, void(PhysicalDisplayId, hal::Vsync));
MOCK_CONST_METHOD1(getRefreshTimestamp, nsecs_t(PhysicalDisplayId));