Update the ensure activities visible condition for activity home stack.

There is a policy to say there is no other task in the home stack should
be visible behind the home activity. After 076c3b1b, Activity stack check
each activity visibility state by EnsureActivitiesVisibleHelper. Only
the topmost activity in home stack was being visible, the rest activities
within the same task were always evaluated as invisible
(no matter the topmost activity is fullscreen or not).

This CL update the determined rule and add test case.
Rule: 1. activity type is home
      2. Check if activity is the root of the task.

Bug: 145636535
Test: 1. atest WmTests:ActivityStackTests
      2. Connect to WIFI in OOBE. Check the background activity if visible.

Change-Id: I8a635f4f162ce627ee56306726f87ddcf2790073
2 files changed