Add XML configuration for density
This CL adds a <densityMap> element to the existing
display device configuration XML files. This can be used
to configure the logical display density per resolution.
Additionally densityMap can be placed in a default.xml file.
This config will be used if there is no per display configuration,
for example for external displays.
If there is no densityMap, the will fallback to the previous
logic and will get the density value provided by SurfaceFlinger
(which is the value of ro.sf.lcd_density).
Bug: 160147805
Fixes: 207330669
Test: atest DensityMapTest DisplayContentTests
Test: manually change the display mode on a device and make sure
that the density changes (= icons on the launcher stay
at the same size)
Test: manually on device with config_maxUiWidth make
sure that when changing to a resolution bigger than
config_maxUiWidth the density is scaled propertly
Change-Id: I7e31ffb7ab5d1ba4fbeff902d2ddb6fa9b2995fd
9 files changed