Fix the startingWindow may clipped during AR#transferStartingWindow

Consider a transferStartingWindow use case that a trampoline activity
with unspecified orientation to start another activity with fixed
landcape orientation,

As AR#setInsetsFrozen(true) will be invoked when the trampoline activity
is leaving, and then calling AR#transferStartingWindow if the
trampoline activity is finishing. If we don't clear the frozen insets
state when transferring the starting window to the new target activity,

it may end up seeing a flicker that the starting window being clipped
because computeWindowFrames took the wrong frozen insets state and leads
to the starting window frame size wrong.

Ensure to call clearFrozenInsetsState for the starting window when
transfering to the new activity for fixing this flicker case.

Bug: 235440740
Test: atest ActivityRecordTests#\
    testTryTransferStartingWindowFromHiddenAboveToken
Change-Id: I78d59308c6353e841ca8ba2f60428063094c5d25
2 files changed