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
This commit is contained in:
committed by
Charles Chen
parent
8f36aba1fb
commit
0be1d67b68
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user