Merge "Fix the startingWindow may clipped during AR#transferStartingWindow" into tm-dev
This commit is contained in:
@@ -4300,9 +4300,15 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
mTransitionController.collect(tStartingWindow);
|
||||
tStartingWindow.reparent(this, POSITION_TOP);
|
||||
|
||||
// Propagate other interesting state between the tokens. If the old token is displayed,
|
||||
// we should immediately force the new one to be displayed. If it is animating, we need
|
||||
// to move that animation to the new one.
|
||||
// Clear the frozen insets state when transferring the existing starting window to
|
||||
// the next target activity. In case the frozen state from a trampoline activity
|
||||
// affecting the starting window frame computation to see the window being
|
||||
// clipped if the rotation change during the transition animation.
|
||||
tStartingWindow.clearFrozenInsetsState();
|
||||
|
||||
// Propagate other interesting state between the tokens. If the old token is
|
||||
// displayed, we should immediately force the new one to be displayed. If it is
|
||||
// animating, we need to move that animation to the new one.
|
||||
if (fromActivity.allDrawn) {
|
||||
allDrawn = true;
|
||||
}
|
||||
|
||||
@@ -2811,12 +2811,18 @@ public class ActivityRecordTests extends WindowTestsBase {
|
||||
true, false, false, false);
|
||||
waitUntilHandlersIdle();
|
||||
|
||||
final WindowState startingWindow = activityTop.mStartingWindow;
|
||||
assertNotNull(startingWindow);
|
||||
|
||||
// Make the top one invisible, and try transferring the starting window from the top to the
|
||||
// bottom one.
|
||||
activityTop.setVisibility(false, false);
|
||||
activityBottom.transferStartingWindowFromHiddenAboveTokenIfNeeded();
|
||||
waitUntilHandlersIdle();
|
||||
|
||||
// Expect getFrozenInsetsState will be null when transferring the starting window.
|
||||
assertNull(startingWindow.getFrozenInsetsState());
|
||||
|
||||
// Assert that the bottom window now has the starting window.
|
||||
assertNoStartingWindow(activityTop);
|
||||
assertHasStartingWindow(activityBottom);
|
||||
|
||||
Reference in New Issue
Block a user