Restore the density when it has been overridden

When the density is overridden, the new density remains the same during
the resolution changes, which causes improper DPI on the screen. The
patch recalculates the suitable overridden density when the resolution
is changed and applies the new settings when the new resolution takes
place.

Bug: 233698163
Test: Switch resolution with customized density
Change-Id: I0914de61da0ab3b78380b355f47dbd3052079492
1 file changed