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

Skip to content
Commit 0749da8c authored by Kazuki Takise's avatar Kazuki Takise
Browse files

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
parent 9c19e34d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment