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

Commit 74a1163a authored by Eric Lin's avatar Eric Lin
Browse files

Refactor and share TransitionInfoBuilder for shell tests.

This commit refactors the `TransitionInfoBuilder` utility by moving it
from the `WMShellUnitTests` module to the shared `WMShellTests-utils`
library, located at `WindowManager/Shell/tests/util`. This change
facilitates the sharing of the builder between the `WMShellUnitTests`
and `CarWMShellUnitTests` modules, promoting code reuse for future
updates.

The `TransitionInfoBuilder` has been rewritten in Kotlin with detailed
KDoc, improving its understandability and maintainability. Additionally,
the API for constructing `TransitionInfo.Change` objects has been
streamlined. Specifically, verbose calls like `addChange(mode, flags,
null, null, null)` have been replaced with a more concise and expressive
overloaded method `addChange(mode, flags)`. This simplification enhances
the clarity and readability of the test code.

BUG: 387193964
Test: atest CarWMShellUnitTests WMShellUnitTests
Test: atest WMShellRobolectricTests
Flag: EXEMPT refactor
Change-Id: I6604db50f8e6e10497e3d84db16c8658253b3c2d
parent 990bafd3
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