Avoid creating new instance on top when started for result

A new activity instance was created when the task top activity with
launch mode singleTop started itself via startActivityForResult.

Update the rule for checking if the activity being launched is the
same as the one currently at the top. Send the cancel result back
if startActivityForResult on the case. Moreover, remove the
Single-task condition because it is not working here.

Bug: 122967919
Test: atest IntentTests
Change-Id: I4c59e8050cb6ddb7430d8141d8454699dc14d2a0
1 file changed