Consolidate waiting list of visible and launched activity
Previously, when "am start -W $activityName" launches a new activity, it just blindly catches for any next drawn activity. E.g. press home key before the target activity is drawn, the launch result will show the result of home. The case of launching existing activity was handled separately because the target component name is usually known, but the case of new activity is unknown because it may be a trampoline that launches other activities. Now the WaitInfo can track the launch sequence according to the LaunchingState provided by ActivityMetricsLogger. So both the cases can share the same logic with distinguishing the individual launch events. If a launch event is aborted, as the above example of returning to home, ActivityMetricsLogger will know the original task is no longer visible and notify to stop waiting the result. The launch state of result will be set to LAUNCH_STATE_UNKNOWN with the original target component name. Bug: 129868870 Test: CtsWindowManagerDeviceTestCases:AmStartOptionsTests ActivityTaskSupervisorTests#testReportWaitingActivityLaunched Change-Id: I201a275c780749cba570319d522b7921612c6ca3
Loading
Please register or sign in to comment