Fix CtsWindowManagerDeviceActivity:android.server.wm.intent.IntentTests for the visible background user
This test re-runs a previously recorded Persistence.TestCase
and verifies that the recorded states match the states resulting
from the rerun.
It always launches an activity on the default display and checks
the results there, even if the tests are performed on
the secondary user assigned to the secondary display.
To fix this, modify the logics to launch the activity and check
the result in the display assigned to the user.
Bug: 354040949
Test: atest CtsWindowManagerDeviceActivity:android.server.wm.intent.IntentTests
Test: atest --user-type secondary_user CtsWindowManagerDeviceActivity:android.server.wm.intent.IntentTests
Test: atest --user-type secondary_user_on_secondary_display CtsWindowManagerDeviceActivity:android.server.wm.intent.IntentTests
Change-Id: I52a9260f93828cdbb448516d9f1f9387f73c7d9f
2 files changed