Finish fixed rotation of recents if it is invisible

The recents animation may be finished due to device is going to
sleep, and then the recents activity will be invisible so there
won't be a transition finish callback due to no visibility change
when cleaning up recents animation.

So if recents activity was invisible before finishing animation,
just follow the current display orientation and reset the fixed
rotation states.

Bug: 171264143
Test: atest RecentsAnimationControllerTest# \
      testClearFixedRotationLaunchingAppAfterCleanupAnimation

Change-Id: Ic2028b5e1d960d1dcebbc1a56f44f93326335d57
2 files changed