Merge "Fixing rotation issues." into oc-dev

This commit is contained in:
TreeHugger Robot
2017-04-01 00:41:21 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 4 deletions

View File

@@ -2252,9 +2252,10 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
return; return;
} }
if (!allowResizeInDockedMode && getStack(DOCKED_STACK_ID) != null) { if (!allowResizeInDockedMode && !StackId.tasksAreFloating(stackId) &&
// If the docked stack exist we don't allow resizes of stacks not caused by the docked getStack(DOCKED_STACK_ID) != null) {
// stack size changing so things don't get out of sync. // If the docked stack exists, don't resize non-floating stacks independently of the
// size computed from the docked stack size (otherwise they will be out of sync)
return; return;
} }

View File

@@ -340,7 +340,7 @@ public class TaskStack extends WindowContainer<Task> implements DimLayer.DimLaye
* @return the source bounds for the bounds animation. * @return the source bounds for the bounds animation.
*/ */
void getAnimatingSourceBounds(Rect outBounds) { void getAnimatingSourceBounds(Rect outBounds) {
if (mBoundsAnimationSourceBounds != null) { if (!mBoundsAnimationSourceBounds.isEmpty()) {
outBounds.set(mBoundsAnimationSourceBounds); outBounds.set(mBoundsAnimationSourceBounds);
return; return;
} }
@@ -419,6 +419,11 @@ public class TaskStack extends WindowContainer<Task> implements DimLayer.DimLaye
// we can just update and return them here // we can just update and return them here
setBounds(mBounds); setBounds(mBounds);
mBoundsAfterRotation.set(mBounds); mBoundsAfterRotation.set(mBounds);
// Once we've set the bounds based on the rotation of the old bounds in the new
// orientation, clear the animation target bounds since they are obsolete
mBoundsAnimationTarget.setEmpty();
mBoundsAnimationSourceBounds.setEmpty();
return true; return true;
} }