Add flicker test for relaunching bubble into split screen.
This change adds a new flicker test, RelaunchBubbleIntoSplitScreenTest,
to verify the transition when a bubbled application is relaunched from a
secondary split-screen app. The test confirms that the existing bubble
is dismissed and its task correctly moves into the secondary
split-screen pane, replacing the previous app. This improves test
coverage for bubble and split-screen interactions.
The test infrastructure has been enhanced for greater flexibility. A
generic clickButtonAndWaitForSync extension function is introduced to
centralize the logic for clicking a button and waiting for a window
state change. Both TwoActivitiesAppHelper and NewTasksAppHelper are
updated to use this extension, simplifying their implementation.
NewTasksAppHelper is also extended with distinct methods (openNewTask
and openNewTaskWithRecycle) for different launch scenarios.
For improved test modularity, BubbleExitTestCases is extracted from
BubbleDismissesTestCases to provide a general set of verifications for
bubble exit transitions. A new SecondarySplitEnterTestCases is also
added to verify that an app correctly enters the secondary split-screen
area.
Finally, the LaunchNewTaskActivity test app is updated with a new button
that launches an activity using FLAG_ACTIVITY_CLEAR_TOP |
FLAG_ACTIVITY_NEW_TASK. This is crucial for triggering the desired
task-recycling behavior needed for this test scenario.
Bug: 438056383
Flag: EXEMPT TEST_ONLY
Test: atest WMShellExplicitFlickerTestsBubbles:RelaunchBubbleIntoSplitScreenTest
Change-Id: I12d273853e06b76a8a6b62e868c6af0768b2e3b5
14 files changed