Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0bf4537 authored by Bo Majewski's avatar Bo Majewski
Browse files

[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
parent ad191808
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment