RESTRICT AUTOMERGE: Fix android.server.am.lifecycle.ActivityLifecycleTests#testResultInNonFocusedStack cts case

Test: run cts -m CtsActivityManagerDeviceTestCases -t android.server.am.lifecycle.ActivityLifecycleTests#testResultInNonFocusedStack

Root cause:Case needs sometime to wait for CallbackTrackingActivity stoped before secondActivity finished.

Bug:129381894
Change-Id: If8a16c0a71877e110cf173920ba3af6341432492
diff --git a/tests/framework/base/activitymanager/src/android/server/am/lifecycle/ActivityLifecycleTests.java b/tests/framework/base/activitymanager/src/android/server/am/lifecycle/ActivityLifecycleTests.java
index 0e92146..712f729 100644
--- a/tests/framework/base/activitymanager/src/android/server/am/lifecycle/ActivityLifecycleTests.java
+++ b/tests/framework/base/activitymanager/src/android/server/am/lifecycle/ActivityLifecycleTests.java
@@ -346,6 +346,7 @@
         getLaunchActivityBuilder().execute();
 
         waitAndAssertActivityStates(state(secondActivity, ON_PAUSE));
+        waitAndAssertActivityStates(state(callbackTrackingActivity, ON_STOP));
 
         // Finish top activity and verify that activity below became focused.
         getLifecycleLog().clear();