Fix testScreenConfiguration case

Root cause: We are allowed to set device density to 408 for Android P,
however, the way we realize is to set a new property to overlay it, so
DisplayMetrics#densityDpi cannot get our real denisty, then the case fail.

Solution:use DisplayMetrics.DENSITY_DEVICE_STABLE to represent the real density

Test: run cts -m CtsDpiTestCases -t
android.dpi.cts.ConfigurationTest#testScreenConfiguration

Bug: 128574091

Change-Id: I9abf40e0e708b9c045ce9d816f37630eff5aa665
diff --git a/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java b/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java
index 7ac5246..8fdc701 100644
--- a/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java
+++ b/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java
@@ -83,8 +83,8 @@
         allowedDensities.add(DisplayMetrics.DENSITY_XXHIGH);
         allowedDensities.add(DisplayMetrics.DENSITY_560);
         allowedDensities.add(DisplayMetrics.DENSITY_XXXHIGH);
-        assertTrue("DisplayMetrics#densityDpi must be one of the DisplayMetrics.DENSITY_* values: "
-                + allowedDensities, allowedDensities.contains(mMetrics.densityDpi));
+        assertTrue("DisplayMetrics.DENSITY_DEVICE_STABLE must be one of the DisplayMetrics.DENSITY_* values: "
+                + allowedDensities, allowedDensities.contains(DisplayMetrics.DENSITY_DEVICE_STABLE));
 
         assertEquals(mMetrics.density,
                 (float) mMetrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT,