Merge \"Fixing app transition due to left-nav bar inset.\" into nyc-mr1-dev

am: 8d90128bc9

Change-Id: If7c8d92a27d96668ab4698828401bcc236086ff3
This commit is contained in:
Winson
2016-07-07 00:37:44 +00:00
committed by android-build-merger
5 changed files with 9 additions and 8 deletions

View File

@@ -609,7 +609,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
stackLayout.setSystemInsets(systemInsets);
if (stack != null) {
stackLayout.getTaskStackBounds(displayRect, windowRect, systemInsets.top,
systemInsets.right, mTaskStackBounds);
systemInsets.left, systemInsets.right, mTaskStackBounds);
stackLayout.reset();
stackLayout.initialize(displayRect, windowRect, mTaskStackBounds,
TaskStackLayoutAlgorithm.StackState.getStackStateForStack(stack));

View File

@@ -511,8 +511,8 @@ public class TaskStack {
int top = dockArea.bottom < 1f
? 0
: insets.top;
layoutAlgorithm.getTaskStackBounds(displayRect, windowRectOut, top, insets.right,
taskStackBounds);
layoutAlgorithm.getTaskStackBounds(displayRect, windowRectOut, top, insets.left,
insets.right, taskStackBounds);
return taskStackBounds;
}
}

View File

@@ -1058,9 +1058,9 @@ public class TaskStackLayoutAlgorithm {
* top and right system insets (but not the bottom inset) and left/right paddings, but _not_
* the top/bottom padding or insets.
*/
public void getTaskStackBounds(Rect displayRect, Rect windowRect, int topInset, int rightInset,
Rect taskStackBounds) {
taskStackBounds.set(windowRect.left, windowRect.top + topInset,
public void getTaskStackBounds(Rect displayRect, Rect windowRect, int topInset, int leftInset,
int rightInset, Rect taskStackBounds) {
taskStackBounds.set(windowRect.left + leftInset, windowRect.top + topInset,
windowRect.right - rightInset, windowRect.bottom);
// Ensure that the new width is at most the smaller display edge size

View File

@@ -1191,7 +1191,8 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
// bounds have changed. This is because we may get spurious measures while dragging where
// our current stack bounds reflect the target drop region.
mLayoutAlgorithm.getTaskStackBounds(mDisplayRect, new Rect(0, 0, width, height),
mLayoutAlgorithm.mSystemInsets.top, mLayoutAlgorithm.mSystemInsets.right, mTmpRect);
mLayoutAlgorithm.mSystemInsets.top, mLayoutAlgorithm.mSystemInsets.left,
mLayoutAlgorithm.mSystemInsets.right, mTmpRect);
if (!mTmpRect.equals(mStableStackBounds)) {
mStableStackBounds.set(mTmpRect);
mStackBounds.set(mTmpRect);

View File

@@ -1057,7 +1057,7 @@ public class AppTransition implements Dump {
final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1;
final int thumbHeightI = mTmpRect.height();
final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1;
final int thumbStartX = mTmpRect.left - containingFrame.left;
final int thumbStartX = mTmpRect.left - containingFrame.left - contentInsets.left;
final int thumbStartY = mTmpRect.top - containingFrame.top;
switch (thumbTransitState) {