diff options
author | Craig Mautner <cmautner@google.com> | 2013-05-24 15:49:29 -0700 |
---|---|---|
committer | Craig Mautner <cmautner@google.com> | 2013-05-24 16:12:57 -0700 |
commit | 5a449154d1795abe8e44b7bfe821d640b145e2c6 (patch) | |
tree | e8a9936e1e39aa01b8d217ff36eab0e9e57715f6 /services/java/com/android/server/wm/DisplayContent.java | |
parent | 5ff12101722874f5e7b0cadf06f4c53f4ec4b917 (diff) | |
download | frameworks_base-5a449154d1795abe8e44b7bfe821d640b145e2c6.zip frameworks_base-5a449154d1795abe8e44b7bfe821d640b145e2c6.tar.gz frameworks_base-5a449154d1795abe8e44b7bfe821d640b145e2c6.tar.bz2 |
Convert API refs to StackBox from ActivityStack.
- Removed IActivityManager.getStacks() since getStackBoxes() is better.
- Made createStacks operate relative to StackBox instead of TaskStack.
- Made resizeStack into resizeStackBox.
Change-Id: I7a0e1f4e34f399b4fd1180c60cc3989f9c2433f3
Diffstat (limited to 'services/java/com/android/server/wm/DisplayContent.java')
-rw-r--r-- | services/java/com/android/server/wm/DisplayContent.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/services/java/com/android/server/wm/DisplayContent.java b/services/java/com/android/server/wm/DisplayContent.java index 8ad2ef1..0647296 100644 --- a/services/java/com/android/server/wm/DisplayContent.java +++ b/services/java/com/android/server/wm/DisplayContent.java @@ -203,11 +203,11 @@ class DisplayContent { } /** Refer to {@link WindowManagerService#createStack(int, int, int, float)} */ - TaskStack createStack(WindowManagerService service, int stackId, int relativeStackId, + TaskStack createStack(WindowManagerService service, int stackId, int relativeStackBoxId, int position, float weight) { TaskStack newStack = null; - if (DEBUG_STACK) Slog.d(TAG, "createStack: stackId=" + stackId + " relativeStackId=" - + relativeStackId + " position=" + position + " weight=" + weight); + if (DEBUG_STACK) Slog.d(TAG, "createStack: stackId=" + stackId + " relativeStackBoxId=" + + relativeStackBoxId + " position=" + position + " weight=" + weight); if (mStackBoxes.isEmpty()) { if (stackId != HOME_STACK_ID) { throw new IllegalArgumentException("createStack: First stackId not " @@ -226,7 +226,7 @@ class DisplayContent { if (position == StackBox.TASK_STACK_GOES_OVER || position == StackBox.TASK_STACK_GOES_UNDER) { // Position indicates a new box is added at top level only. - if (box.contains(relativeStackId)) { + if (box.contains(relativeStackBoxId)) { StackBox newBox = new StackBox(service, this, null); newStack = new TaskStack(service, stackId, this); newStack.mStackBox = newBox; @@ -239,14 +239,14 @@ class DisplayContent { } } else { // Remaining position values indicate a box must be split. - newStack = box.split(stackId, relativeStackId, position, weight); + newStack = box.split(stackId, relativeStackBoxId, position, weight); if (newStack != null) { break; } } } if (stackBoxNdx < 0) { - throw new IllegalArgumentException("createStack: stackId " + relativeStackId + throw new IllegalArgumentException("createStack: stackBoxId " + relativeStackBoxId + " not found."); } } @@ -256,11 +256,12 @@ class DisplayContent { return newStack; } - /** Refer to {@link WindowManagerService#resizeStack(int, float)} */ - boolean resizeStack(int stackId, float weight) { + /** Refer to {@link WindowManagerService#resizeStackBox(int, float)} */ + boolean resizeStack(int stackBoxId, float weight) { for (int stackBoxNdx = mStackBoxes.size() - 1; stackBoxNdx >= 0; --stackBoxNdx) { final StackBox box = mStackBoxes.get(stackBoxNdx); - if (box.resize(stackId, weight)) { + if (box.resize(stackBoxId, weight)) { + layoutNeeded = true; return true; } } |