Don't finish noHistory activity while it is on the topmost.

There was no top running activity in the target task result in the
NPE.

The CL makes sure the top running noHistory activity is not finished
when launched again and have protection for getTopNonFinishingActivity.

Bug: 159507052
Test: atest testNoHistoryActivityNotFinished
Change-Id: Id582f28d79bec052115e07d98c097c7d50c11609
2 files changed