Only update launchSource to top activity...

...if the launch activity isn't added to task.
So the state of the previous activity won't get overwritten by the
subsequent launch, which affects the shouldMoveTaskToBack result.

Flag: EXEMPT bugfix
Bug: 412305625
Test: verify no regression 340401554
Test: atest ActivityStarterTests
Test: launch activity A, then start activity B from A. Verify A won't
be finished with default back navigation.

Change-Id: I2c3129cd0979a23ee85239f9ba0c41efa52c77fe
2 files changed