Use WindowManager#getMaximumWindowMetrics() to get display size

Display#getWidth(), which is a deprecated API in R, returns a "activity display" size instead of the actual size of display although this test expects the actual size.
This causes a CTS failure in a multi-window environment.

So this CL change to use WindowManager#getMaximumWindowMetrics() which is a newly introduced API to get the actual size of display.

Bug: 166541537
Test: atest android.widget.cts.ListPopupWindowTest#testAnchoring
Test: atest android.widget.cts.ListPopupWindowTest#testAnchoringWithHorizontalOffset
Test: atest android.widget.cts.ListPopupWindowTest#testAnchoringWithVerticalOffset
Change-Id: I29bfd818a6556a6395c049a14b95086526bbf7f5
1 file changed