Handle orientation behind for fixed rotation

The activity which decides the display orientation may not always
be the top activity, such as declaring "behind" orientation. And
because recents animation will be canceled when display orientation
changes, it causes to fail swiping to a orientation-behind app.

So simply get the real top if the orientation source is not visible.

Bug: 226298709
Test: atest DisplayContentTests#testOrientationBehind
Test: With TaskA{portrait}, TaskB{behind, landscape}, it should
      be able to use quickstep to swipe from TaskA to TaskB

Change-Id: I4cf9f3ab977ac7c8b22eb4c37218a5d2019bfabc
2 files changed