Ignore orientation from invisible non-activity window

This restores the orientation condition as in Q. Otherwise the
display orientation may still be controlled by an invisible
overlay window (e.g. its root view has set View.GONE) .

Bug: 169468732
Test: DisplayAreaTest#testGetOrientation
Change-Id: I517be9fb135eeb69722054e6191ef500f2f47da9
Merged-In: I517be9fb135eeb69722054e6191ef500f2f47da9
(cherry picked from commit 4136db264624a343d92c818efb8453a2a5f0852a)
3 files changed