Loading services/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -340,7 +340,7 @@ class DisplayContent { boolean setStackBoxSize(Rect contentRect) { boolean change = false; for (int stackBoxNdx = mStackBoxes.size() - 1; stackBoxNdx >= 0; --stackBoxNdx) { change |= mStackBoxes.get(stackBoxNdx).setStackBoxSizes(contentRect); change |= mStackBoxes.get(stackBoxNdx).setStackBoxSizes(contentRect, true); } return change; } Loading services/java/com/android/server/wm/StackBox.java +16 −8 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ public class StackBox { /** Dirty flag. Something inside this or some descendant of this has changed. */ boolean layoutNeeded; /** True if this StackBox sits below the Status Bar. */ boolean mUnderStatusBar; /** Used to keep from reallocating a temporary Rect for propagating bounds to child boxes */ Rect mTmpRect = new Rect(); Loading Loading @@ -286,14 +289,19 @@ public class StackBox { /** If this is a terminal StackBox (contains a TaskStack) set the bounds. * @param bounds The rectangle to set the bounds to. * @param underStatusBar True if the StackBox is directly below the Status Bar. * @return True if the bounds changed, false otherwise. */ boolean setStackBoxSizes(Rect bounds) { boolean change; boolean setStackBoxSizes(Rect bounds, boolean underStatusBar) { boolean change = false; if (mUnderStatusBar != underStatusBar) { change = true; mUnderStatusBar = underStatusBar; } if (mStack != null) { change = !mBounds.equals(bounds); change |= !mBounds.equals(bounds); if (change) { mBounds.set(bounds); mStack.setBounds(bounds); mStack.setBounds(bounds, underStatusBar); } } else { mTmpRect.set(bounds); Loading @@ -301,18 +309,18 @@ public class StackBox { final int height = bounds.height(); int firstHeight = (int)(height * mWeight); mTmpRect.bottom = bounds.top + firstHeight; change = mFirst.setStackBoxSizes(mTmpRect); change |= mFirst.setStackBoxSizes(mTmpRect, underStatusBar); mTmpRect.top = mTmpRect.bottom; mTmpRect.bottom = bounds.top + height; change |= mSecond.setStackBoxSizes(mTmpRect); change |= mSecond.setStackBoxSizes(mTmpRect, false); } else { final int width = bounds.width(); int firstWidth = (int)(width * mWeight); mTmpRect.right = bounds.left + firstWidth; change = mFirst.setStackBoxSizes(mTmpRect); change |= mFirst.setStackBoxSizes(mTmpRect, underStatusBar); mTmpRect.left = mTmpRect.right; mTmpRect.right = bounds.left + width; change |= mSecond.setStackBoxSizes(mTmpRect); change |= mSecond.setStackBoxSizes(mTmpRect, underStatusBar); } } return change; Loading services/java/com/android/server/wm/TaskStack.java +2 −1 Original line number Diff line number Diff line Loading @@ -222,7 +222,7 @@ public class TaskStack { } } void setBounds(Rect bounds) { void setBounds(Rect bounds, boolean underStatusBar) { mDimLayer.setBounds(bounds); mAnimationBackgroundSurface.setBounds(bounds); Loading @@ -236,6 +236,7 @@ public class TaskStack { if (!resizingWindows.contains(win)) { resizingWindows.add(win); } win.mUnderStatusBar = underStatusBar; } } } Loading Loading
services/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -340,7 +340,7 @@ class DisplayContent { boolean setStackBoxSize(Rect contentRect) { boolean change = false; for (int stackBoxNdx = mStackBoxes.size() - 1; stackBoxNdx >= 0; --stackBoxNdx) { change |= mStackBoxes.get(stackBoxNdx).setStackBoxSizes(contentRect); change |= mStackBoxes.get(stackBoxNdx).setStackBoxSizes(contentRect, true); } return change; } Loading
services/java/com/android/server/wm/StackBox.java +16 −8 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ public class StackBox { /** Dirty flag. Something inside this or some descendant of this has changed. */ boolean layoutNeeded; /** True if this StackBox sits below the Status Bar. */ boolean mUnderStatusBar; /** Used to keep from reallocating a temporary Rect for propagating bounds to child boxes */ Rect mTmpRect = new Rect(); Loading Loading @@ -286,14 +289,19 @@ public class StackBox { /** If this is a terminal StackBox (contains a TaskStack) set the bounds. * @param bounds The rectangle to set the bounds to. * @param underStatusBar True if the StackBox is directly below the Status Bar. * @return True if the bounds changed, false otherwise. */ boolean setStackBoxSizes(Rect bounds) { boolean change; boolean setStackBoxSizes(Rect bounds, boolean underStatusBar) { boolean change = false; if (mUnderStatusBar != underStatusBar) { change = true; mUnderStatusBar = underStatusBar; } if (mStack != null) { change = !mBounds.equals(bounds); change |= !mBounds.equals(bounds); if (change) { mBounds.set(bounds); mStack.setBounds(bounds); mStack.setBounds(bounds, underStatusBar); } } else { mTmpRect.set(bounds); Loading @@ -301,18 +309,18 @@ public class StackBox { final int height = bounds.height(); int firstHeight = (int)(height * mWeight); mTmpRect.bottom = bounds.top + firstHeight; change = mFirst.setStackBoxSizes(mTmpRect); change |= mFirst.setStackBoxSizes(mTmpRect, underStatusBar); mTmpRect.top = mTmpRect.bottom; mTmpRect.bottom = bounds.top + height; change |= mSecond.setStackBoxSizes(mTmpRect); change |= mSecond.setStackBoxSizes(mTmpRect, false); } else { final int width = bounds.width(); int firstWidth = (int)(width * mWeight); mTmpRect.right = bounds.left + firstWidth; change = mFirst.setStackBoxSizes(mTmpRect); change |= mFirst.setStackBoxSizes(mTmpRect, underStatusBar); mTmpRect.left = mTmpRect.right; mTmpRect.right = bounds.left + width; change |= mSecond.setStackBoxSizes(mTmpRect); change |= mSecond.setStackBoxSizes(mTmpRect, underStatusBar); } } return change; Loading
services/java/com/android/server/wm/TaskStack.java +2 −1 Original line number Diff line number Diff line Loading @@ -222,7 +222,7 @@ public class TaskStack { } } void setBounds(Rect bounds) { void setBounds(Rect bounds, boolean underStatusBar) { mDimLayer.setBounds(bounds); mAnimationBackgroundSurface.setBounds(bounds); Loading @@ -236,6 +236,7 @@ public class TaskStack { if (!resizingWindows.contains(win)) { resizingWindows.add(win); } win.mUnderStatusBar = underStatusBar; } } } Loading