Pinned stack animation: Prevent window preservation during animation.
When moving to the fullscreen stack, we were triggering the resized while not drag resizing logic, causing a window preservation in the middle of the animation. Bug: 35396882 Test: Move skeleton pinned app between states. Verify no freezes or size jumps during animation. Change-Id: I4a72945742241b3a039b997a8da6aba89e935346
This commit is contained in:
@@ -1483,7 +1483,7 @@ public class TaskStack extends WindowContainer<Task> implements DimLayer.DimLaye
|
||||
return StackId.hasMovementAnimations(mStackId);
|
||||
}
|
||||
|
||||
public boolean getForceScaleToStack() {
|
||||
public boolean isForceScaled() {
|
||||
return mBoundsAnimating;
|
||||
}
|
||||
|
||||
|
||||
@@ -1581,7 +1581,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
// Anyway we don't need to synchronize position and content updates for these
|
||||
// windows since they aren't at the base layer and could be moved around anyway.
|
||||
if (!computeDragResizing() && mAttrs.type == TYPE_BASE_APPLICATION &&
|
||||
!getTask().mStack.getBoundsAnimating() && !isGoneForLayoutLw() &&
|
||||
!mWinAnimator.isForceScaled() && !isGoneForLayoutLw() &&
|
||||
!getTask().inPinnedWorkspace()) {
|
||||
setResizedWhileNotDragResizing(true);
|
||||
}
|
||||
|
||||
@@ -1318,7 +1318,7 @@ class WindowStateAnimator {
|
||||
float surfaceWidth = mSurfaceController.getWidth();
|
||||
float surfaceHeight = mSurfaceController.getHeight();
|
||||
|
||||
if ((task != null && task.mStack.getForceScaleToStack()) || mForceScaleUntilResize) {
|
||||
if (isForceScaled()) {
|
||||
int hInsets = w.getAttrs().surfaceInsets.left + w.getAttrs().surfaceInsets.right;
|
||||
int vInsets = w.getAttrs().surfaceInsets.top + w.getAttrs().surfaceInsets.bottom;
|
||||
if (!mForceScaleUntilResize) {
|
||||
@@ -1953,4 +1953,16 @@ class WindowStateAnimator {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** The force-scaled state for a given window can persist past
|
||||
* the state for it's stack as the windows complete resizing
|
||||
* independently of one another.
|
||||
*/
|
||||
boolean isForceScaled() {
|
||||
final Task task = mWin.getTask();
|
||||
if (task != null && task.mStack.isForceScaled()) {
|
||||
return true;
|
||||
}
|
||||
return mForceScaleUntilResize;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user