Properly handle start results when using wait flag.
Previously, delivering an intent to the foreground activity was inccorectly classified as START_TASK_TO_FRONT, rather than START_DELIVERED_TO_TOP. In the direct case, this occurs when the target activity is already in front. In the indirect case, this can occur when the target activity is in the background and launched by a trampoline in the same task. The trampoline launch will bring forward the task. However, since it is not focusable (finishing at the time the second launch occurs), the target activity is already on top. This changelist rectifies this issue by first handling START_DELIVERED_TO_TOP in the direct wait case. This includes setting the who value of result to the started real activity. This changelist addresses the indirect case by reporting delivered to top in the case there are waiting activities after a result. Fixes: 72654906 Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerAmStartOptionsTests Test: atest FrameworksServicesTests:com.android.server.am.ActivityStackSupervisorTests Change-Id: I65043e35ef8a20f90bf7cccbf4f1caf110cca246
Loading
Please register or sign in to comment