Make sure only the top-most running activity can be active

A visible activity that was behind other non-fullscreen activities
was made active while the activity on above was finishing.

Bug: 155568757
Test: atest ActivityRecordTests
Change-Id: I51097008f12a9f0b02e923a718bd1d374c84195c
2 files changed