CTS testAspectRatio fail due to using Display.getRealMetrics

Current CTS test case using Display.getRealMetrics to get full screen size,
which will cause aspect ratio use full screen width/height to calculate, so test case will fail.
To fix such false alarm & get activity display size correctly,
modified CTS test case to use Display.getMetrics to get the real activity size.

Bug: 80370416

Change-Id: I5e3b957c70b6f0b2e8523d5f0c5daf84660e7e71
Signed-off-by: Jeff Xu <jeff_xu@htc.com>
diff --git a/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java b/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java
index fafce61..91702d1 100644
--- a/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java
+++ b/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java
@@ -64,7 +64,7 @@
                 (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
         Display display = windowManager.getDefaultDisplay();
         DisplayMetrics metrics = new DisplayMetrics();
-        display.getRealMetrics(metrics);
+        display.getMetrics(metrics);
 
         int max = Math.max(metrics.widthPixels, metrics.heightPixels);
         int min = Math.min(metrics.widthPixels, metrics.heightPixels);