Do not capture task snapshot with fixed rotated activity

Because the rotation of activity and task are different, The
information of snapshot may be inconsistent. And since it is a
temporal state, in most cases the snapshot is available after
the fixed rotation is cleared. This fixes a non-rotated snapshot
is shown on a rotated activity when repeating launch and swipe
to home quickly.

Also the fixed rotation launching app should not be cleared if
there is pending rotation, otherwise it is too early that the
display is still in old rotation. This fixes flickering when
switching between activities in different rotation from quickstep.

Bug: 155862858
Test: atest TaskSnapshotControllerTest#testPrepareTaskSnapshot
      ActivityRecordTests#testActivityOnCancelFixedRotationTransform
Change-Id: I8e30e87ea4aad907c4ad4338b91fcff3078380ad
4 files changed