Skip to content
Commit a822ccd7 authored by Marin Shalamanov's avatar Marin Shalamanov
Browse files

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
parent 703e5740
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment