Add relative address to DeviceProductInfo.

This CL adds a field relativeAddress to DeviceProductInfo so it can
be surfaced in the framework. For HDMI connections the field is
populated with the physical address. This CL also adds helper
functions for serializing to Flattenable and enhances the
serialization security.

Bug: 147994746
Bug: 153589294
Test: atest DisplayIdentificationTest
Change-Id: I2711407aa1be079df8086e233ee3f0cf90ba1741
diff --git a/services/surfaceflinger/DisplayHardware/DisplayIdentification.cpp b/services/surfaceflinger/DisplayHardware/DisplayIdentification.cpp
index f9281a7..52a6380 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayIdentification.cpp
+++ b/services/surfaceflinger/DisplayHardware/DisplayIdentification.cpp
@@ -92,6 +92,10 @@
         info.manufactureOrModelDate = date;
     }
 
+    if (edid.cea861Block && edid.cea861Block->hdmiVendorDataBlock) {
+        const auto& address = edid.cea861Block->hdmiVendorDataBlock->physicalAddress;
+        info.relativeAddress = {address.a, address.b, address.c, address.d};
+    }
     return info;
 }