Clear fixed rotation if rotated recents activity becomes top

If recents animation is active, the transition is controlled by it.
There won't be a transition finish event after recents animation.
For example, if an activity finishes during swiping-up gesture,
the recents activity in rotated state won't be restored. So this
change checks whether recents become the top activity, then continue
the orientation update procedure to clear fixed rotation state and
let display orientation follow the current top.

Bug: 173143462
Test: atest RecentsAnimationControllerTest# \
            testClearFixedRotationLaunchingAppAfterCleanupAnimation
Change-Id: If82744bb846ac823c8fdd76bbf23b584b63776d4
(cherry picked from commit 498b87a347abb1571bc9c1cd63eb73f2808fb7e8)
2 files changed