Merge "When entering PIP with multi-activity, re-use mLastNonFullscreenBounds." into rvc-dev am: 059531924e

Change-Id: If6056c47bb37c2dfa854bc723836c3126718ee13
This commit is contained in:
TreeHugger Robot
2020-05-18 23:13:59 +00:00
committed by Automerger Merge Worker

View File

@@ -2176,6 +2176,10 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
// move the PIP activity into the task. // move the PIP activity into the task.
stack = taskDisplayArea.createStack(WINDOWING_MODE_UNDEFINED, r.getActivityType(), stack = taskDisplayArea.createStack(WINDOWING_MODE_UNDEFINED, r.getActivityType(),
ON_TOP, r.info, r.intent, false /* createdByOrganizer */); ON_TOP, r.info, r.intent, false /* createdByOrganizer */);
// It's possible the task entering PIP is in freeform, so save the last
// non-fullscreen bounds. Then when this new PIP task exits PIP, it can restore
// to its previous freeform bounds.
stack.setLastNonFullscreenBounds(task.mLastNonFullscreenBounds);
// There are multiple activities in the task and moving the top activity should // There are multiple activities in the task and moving the top activity should
// reveal/leave the other activities in their original task. // reveal/leave the other activities in their original task.