Finish fixed rotation of recents until transition is done

With gesture navigation, while swiping up a landscape activity
a bit and give up the swipe to return to original activity, the
portrait recents activity may still perform relayout before it
becomes invisible. If the fixed rotated configuration is cleared
too early, the out configuration of relayout will be the same as
current display which is landscape. That causes an unexpected
Activity#onConfigurationChanged is called. If home is the recents,
the symptom may be that the widgets are reloaded.

Fixes: 157651692
Test: atest RecentsAnimationControllerTest# \
      testRecentViewInFixedPortraitWhenTopAppInLandscape
Change-Id: I3fde61a6914ca9abf704e737c089101b32cac3aa
2 files changed