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
Loading
Please register or sign in to comment