Fixed flicker on activity transition in docked stack.

- If the app token isn't hidden then it is considered visible
and there is no need to check its children windows to see if
they are visible. The WindowState.isVisible() might say it isn't
visible due to hiddenRequested even though it is visible on-screen
since the app token isn't hidden.
- Comment out check for hiddenRequested flag when determining if a
window state is visible. The window can still be visible on screen
when the flag is true. We would like the isVisible() method to
return an answer closer to if the window is truly visible
(can't be an exact answer without checking the surface state), so
comment out the check for now so we can test to see what problem it
causes.
If it doesn't cause any issues, then we can remove just before we lock
down the current release (O) and also consolidate this method with
If it does cause problems, then we can look if there are other ways
to solve the problems. If there isn't then we uncomment and document why.

Bug: 31630397
Test: Manual testing and existing tests pass.
Change-Id: I230cf0ef5cf1012fb90d93857dd5feb2a330493b
2 files changed