Resuming the restarting activities only if they were on stack top

While starting multiple activities via Activity.startActivities(),
more than one activities were launched within the same task.
If the top activity is not fullscreen, the activities below were
visible and stayed in RESUMED states.

Only resume the top-most activity while restarting it.

Bug: 136126538
Test: atest ActivityStackTests
Change-Id: I63d69609d9ebc31899c22b9d913a587348725826
3 files changed