diff options
5 files changed, 9 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java index 7e1deec3429a..f9e59e7ccf99 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java @@ -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)); diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java index 26200d0fac47..b5753ba39a43 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java +++ b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java @@ -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; } } diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java index e3fe1abf8b20..89789bce6cf4 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java @@ -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 diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java index 586a8bcd8920..21780a6e8864 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java @@ -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); diff --git a/services/core/java/com/android/server/wm/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java index 4553f8e07cda..2b581562d680 100644 --- a/services/core/java/com/android/server/wm/AppTransition.java +++ b/services/core/java/com/android/server/wm/AppTransition.java @@ -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) { |