diff options
author | Andrii Kulian <akulian@google.com> | 2020-03-05 19:34:43 -0800 |
---|---|---|
committer | Charles Chen <charlesccchen@google.com> | 2020-03-24 17:05:50 +0800 |
commit | 0be1d67b681982e20f87359a810ba6c94e438378 (patch) | |
tree | 2bbe898836e47012ec269d2f5309f3741ccfe36a /test-runner/src/android/test/TouchUtils.java | |
parent | 8f36aba1fbd92561475487a81bea71dc1c85e2f6 (diff) |
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
Diffstat (limited to 'test-runner/src/android/test/TouchUtils.java')
-rw-r--r-- | test-runner/src/android/test/TouchUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
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); |