Add activity state check to minimizeDesktopApp

This CL makes minimizeDesktopApp to check the activity goes to a stopped state properly.

Bug: 376603060
Flag: EXEMPT add test
Test: atest PlatformScenarioTests:com.android.wm.shell.functional.MinimizeAppWindowsTest
Change-Id: Ie198fe0774a0af01d0efcfc97ce994e06ff0e257
1 file changed