am dae55017: am 1c48e302: am a7a99981: Merge "Fix Presentation window is removed on stack change"

* commit 'dae55017d828b3a74f272298bc604e93e039b0d0':
  Fix Presentation window is removed on stack change
This commit is contained in:
Craig Mautner
2014-11-26 18:21:59 +00:00
committed by Android Git Automerger

View File

@@ -4878,8 +4878,19 @@ public class WindowManagerService extends IWindowManager.Stub
if (NW > 0) {
mWindowsChanged = true;
}
int targetDisplayId = -1;
Task targetTask = mTaskIdToTask.get(token.appWindowToken.groupId);
if (targetTask != null) {
DisplayContent targetDisplayContent = targetTask.getDisplayContent();
if (targetDisplayContent != null) {
targetDisplayId = targetDisplayContent.getDisplayId();
}
}
for (int i = 0; i < NW; i++) {
WindowState win = windows.get(i);
if (targetDisplayId != -1 && win.getDisplayId() != targetDisplayId) {
continue;
}
if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Tmp removing app window " + win);
win.getWindowList().remove(win);
int j = win.mChildWindows.size();