From 0be1d67b681982e20f87359a810ba6c94e438378 Mon Sep 17 00:00:00 2001 From: Andrii Kulian Date: Thu, 5 Mar 2020 19:34:43 -0800 Subject: Report bounds instead of size in WindowMetrics Use case: Jetpack WM will use them to get the location of windows on screen and compute the display feature positions in window coordinate space. Bug: 150908045 Test: atest FrameworksCoreTests:WindowMetricsTest Test: atest CtsWindowManagerDeviceTestCases:WindowMetricsTests Change-Id: Ia08950cd5df35971408e8b17bb27d97d29d0ab9b Exempt-From-Owner-Approval: API change --- test-runner/src/android/test/TouchUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test-runner') diff --git a/test-runner/src/android/test/TouchUtils.java b/test-runner/src/android/test/TouchUtils.java index bb4e00ba1ef9..f2f0be73c010 100644 --- a/test-runner/src/android/test/TouchUtils.java +++ b/test-runner/src/android/test/TouchUtils.java @@ -223,7 +223,7 @@ public class TouchUtils { public static void dragViewToBottom(InstrumentationTestCase test, Activity activity, View v, int stepCount) { int screenHeight = - activity.getWindowManager().getCurrentWindowMetrics().getSize().getHeight(); + activity.getWindowManager().getCurrentWindowMetrics().getBounds().height(); int[] xy = new int[2]; v.getLocationOnScreen(xy); -- cgit v1.2.3