Do not set activity's task before clearing in some scenarios.
When the clear top and reset task launch flags are specified for a
standard launch mode activity, we should not add the activity to the
task before taking these actions. Doing so leads to the potential of
prematurely ending the starting activity and reparenting the activity
without a window container controller set.
This changelist ensures that the task is not associated until later.
Fixes: 70635977
Test: atest CtsActivityManagerDeviceTestCases:ActivityStarterTests
Change-Id: I8e2245f9ad9f07e259b099daefe9ebb2170ae28d
1 file changed