Workaround for PipMenuActivity not getting resumed changed immediately

- For whatever reason, the call to trigger home while it is already
  visible after the PIP menu activity shows is not triggering the
  top-resumed-changed callback immediately. As a workaround, just start
  another fullscreen activity to transition home from to ensure the
  callbacks happen immediately so the PIP menu can be removed before
  another task overlay activity is added to the task.

Bug: 156314330
Test: atest PinnedStackTests#testFinishPipActivityWithTaskOverlay

Change-Id: Iebbad87893b5d30abe81487bff7f79325b23b47b
diff --git a/tests/framework/base/windowmanager/src/android/server/wm/PinnedStackTests.java b/tests/framework/base/windowmanager/src/android/server/wm/PinnedStackTests.java
index 042eb48..72ce477 100644
--- a/tests/framework/base/windowmanager/src/android/server/wm/PinnedStackTests.java
+++ b/tests/framework/base/windowmanager/src/android/server/wm/PinnedStackTests.java
@@ -1004,6 +1004,8 @@
     @Test
     @FlakyTest(bugId=156314330)
     public void testFinishPipActivityWithTaskOverlay() throws Exception {
+        // Trigger PiP menu activity to properly lose focuse when going home
+        launchActivity(TEST_ACTIVITY);
         // Launch PiP activity
         launchActivity(PIP_ACTIVITY, EXTRA_ENTER_PIP, "true");
         waitForEnterPip(PIP_ACTIVITY);