SF: Confine display serial number to EDID parser
The EDID parser falls back to the serial number if the display name is
missing. Previously, this string was only used to compute a hash for
display ID encoding, but is now propagated through DeviceProductInfo.
Though DeviceProductInfo is currently a hidden API, stop exposing the
serial number in the first place to avoid inadvertently leaking it.
Bug: 138677816
Test: libsurfaceflinger_unittest
Change-Id: I13f4e7f4d0e9e90866b74ac33a048e8809158a43
diff --git a/services/surfaceflinger/DisplayHardware/DisplayIdentification.h b/services/surfaceflinger/DisplayHardware/DisplayIdentification.h
index 0a18ba1..d91b957 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayIdentification.h
+++ b/services/surfaceflinger/DisplayHardware/DisplayIdentification.h
@@ -34,7 +34,7 @@
uint16_t manufacturerId() const;
- static DisplayId fromEdid(uint8_t port, uint16_t manufacturerId, uint32_t displayNameHash);
+ static DisplayId fromEdid(uint8_t port, uint16_t manufacturerId, uint32_t modelHash);
};
inline bool operator==(DisplayId lhs, DisplayId rhs) {
@@ -61,6 +61,7 @@
uint16_t manufacturerId;
uint16_t productId;
PnpId pnpId;
+ uint32_t modelHash;
std::string_view displayName;
uint8_t manufactureOrModelYear;
uint8_t manufactureWeek;