Refactor ScreenDecorWindowTests
To override expected values of assertions, we separate some code
into functions.
Basically, ARC team wants to override expected values as follows.
private void assertTopInsetEquals(Activity activity, int expected) throws Exception {
expected = otherValue;
waitFor(() -> getInsets(activity).getSystemWindowInsetTop() == expected);
...
}
However, without this CL, the labmda function generates the
following error.
error: local variables referenced from a lambda expression must be final or effectively final
This CL resolves the error by separating the wairFor part into another
function.
Bug: 110906754
Test: ScreenDecorWindowTests
Change-Id: Id46557afdbc5cde4683d8ba33a84e5ec951cc27a
1 file changed