Avoid to skip app window due to un-assigned sending to bottom state while app window sort

should assign value of WindowToken.sendingToBottom according to the state of this token is moved to top or bottom
to avoid app window is skiped incorrectly due to sending to bottom state is un-assigned while app window sort
and finding focus window.

Change-Id: I190838d1d01ca229155d5176930178ab41335556
Signed-off-by: tingna_sung <tingna_sung@htc.com>
This commit is contained in:
tingna_sung
2014-10-06 16:36:40 +08:00
parent 4cd671e4d2
commit 9dde78f7da
2 changed files with 12 additions and 0 deletions

View File

@@ -52,6 +52,12 @@ class Task {
return false;
}
void setSendingToBottom(boolean toBottom) {
for (int appTokenNdx = 0; appTokenNdx < mAppTokens.size(); appTokenNdx++) {
mAppTokens.get(appTokenNdx).sendingToBottom = toBottom;
}
}
@Override
public String toString() {
return "{taskId=" + taskId + " appTokens=" + mAppTokens + "}";

View File

@@ -4806,6 +4806,9 @@ public class WindowManagerService extends IWindowManager.Stub
displayContent.moveHomeStackBox(isHomeStackTask);
}
stack.moveTaskToTop(task);
if (mAppTransition.isTransitionSet()) {
task.setSendingToBottom(false);
}
}
} finally {
Binder.restoreCallingIdentity(origId);
@@ -4824,6 +4827,9 @@ public class WindowManagerService extends IWindowManager.Stub
}
final TaskStack stack = task.mStack;
stack.moveTaskToBottom(task);
if (mAppTransition.isTransitionSet()) {
task.setSendingToBottom(true);
}
moveStackWindowsLocked(stack.getDisplayContent());
}
} finally {