Use getRealMetrics for screen configuration tests

The tests in ConfigurationTest as part of test module CtsDpiTestCases
fail on small screen devices due to usage of Display#getMetrics()
instead of Display#getRealMetrics().

As per documentation getRealMetrics() "gets display metrics based on the
real size of this display" while getMetrics() may "not necessarily
represent the actual raw size (native resolution) of the display".

Test: run cts -m CtsDpiTestCases \
        -t android.dpi.cts.ConfigurationTest#testScreenConfiguration
Bug: 147247314
Change-Id: Ifc5a42f1b9f6b4ee727b30aa6dae910765179909
Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com>
1 file changed