DO NOT MERGE -- Fix finishing activity in non-focused stack

This CL explicitly checks if we're finishing activity in non-focused
stack as there are other cases except this one when we finish paused
activities in FINISH_AFTER_VISIBLE mode.

Bug: 29007436
Bug: 29458854
Change-Id: I67744d23cd72f2fe8861180008bfdd284a7b5e26
(cherry picked from commit 995fa2bd2d334a37e10760c21ac108f4a3595713)
(cherry picked from commit 772c598f660444306c9d8bff42e5fba08132e5cf)
1 file changed