[DocsUI, Search]: Fix tests that rely on window size.
There are two test: one correctly named testSearchViewExpandedOnLargeScreen and one incorrectly named testSearchViewExpandedOnSmallScreen. These tests fail due to reliance on the getDensity() method added to WindowMetrics in API level 34. This change simplifies the code a bit. First it replaces unsupported method with display metrics obtained from activity. Secondly, rather than requiring the caller to pass a predicate and a message, it returns the bounds of the window. This let's the caller to form more readable assumption in the test. Bug: 441402939 Flag: com.android.documentsui.flags.use_search_v2_read_only Test: atest DocumentsUIGoogleTests Change-Id: Ie242c30318b0b90519f1d9c71225762ec00eb827
Loading
Please register or sign in to comment