Loading services/core/java/com/android/server/wm/DisplayContent.java +4 −0 Original line number Diff line number Diff line Loading @@ -1059,6 +1059,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo mService.mWindowsChanged = true; } void addToWindowList(WindowState win, int index) { mWindows.add(index, win); } void addChildWindowToWindowList(WindowState win) { final WindowState parentWindow = win.getParentWindow(); Loading services/core/java/com/android/server/wm/WindowManagerService.java +3 −18 Original line number Diff line number Diff line Loading @@ -1276,21 +1276,6 @@ public class WindowManagerService extends IWindowManager.Stub return -1; } private void addInputMethodWindowToListLocked(WindowState win) { int pos = findDesiredInputMethodWindowIndexLocked(true); if (pos >= 0) { if (DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v( TAG_WM, "Adding input method window " + win + " at " + pos); // TODO(multidisplay): IMEs are only supported on the default display. getDefaultWindowListLocked().add(pos, win); mWindowsChanged = true; moveInputMethodDialogsLocked(pos + 1); return; } win.mToken.addWindow(win); moveInputMethodDialogsLocked(pos); } private void reAddWindowToListInOrderLocked(WindowState win) { win.mToken.addWindow(win); // This is a hack to get all of the child windows added as well at the right position. Child Loading @@ -1305,7 +1290,7 @@ public class WindowManagerService extends IWindowManager.Stub } } void logWindowList(final WindowList windows, String prefix) { private void logWindowList(final WindowList windows, String prefix) { int N = windows.size(); while (N > 0) { N--; Loading Loading @@ -1746,7 +1731,7 @@ public class WindowManagerService extends IWindowManager.Stub if (type == TYPE_INPUT_METHOD) { win.mGivenInsetsPending = true; mInputMethodWindow = win; addInputMethodWindowToListLocked(win); win.mToken.addImeWindow(win); imMayMove = false; } else if (type == TYPE_INPUT_METHOD_DIALOG) { mInputMethodDialogs.add(win); Loading Loading @@ -1980,7 +1965,7 @@ public class WindowManagerService extends IWindowManager.Stub } } public void removeWindow(Session session, IWindow client) { void removeWindow(Session session, IWindow client) { synchronized(mWindowMap) { WindowState win = windowForClientLocked(session, client, false); if (win == null) { Loading services/core/java/com/android/server/wm/WindowToken.java +19 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,25 @@ class WindowToken extends WindowContainer<WindowState> { } } void addImeWindow(WindowState win) { int pos = mService.findDesiredInputMethodWindowIndexLocked(true); if (pos < 0) { addWindow(win); mService.moveInputMethodDialogsLocked(pos); return; } if (DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG_WM, "Adding input method window " + win + " at " + pos); mDisplayContent.addToWindowList(win, pos); if (!mChildren.contains(win)) { addChild(win, null); } mService.mWindowsChanged = true; mService.moveInputMethodDialogsLocked(pos + 1); } /** Return the first window in the token window list that isn't a starting window or null. */ WindowState getFirstNonStartingWindow() { final int count = mChildren.size(); Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +4 −0 Original line number Diff line number Diff line Loading @@ -1059,6 +1059,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo mService.mWindowsChanged = true; } void addToWindowList(WindowState win, int index) { mWindows.add(index, win); } void addChildWindowToWindowList(WindowState win) { final WindowState parentWindow = win.getParentWindow(); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +3 −18 Original line number Diff line number Diff line Loading @@ -1276,21 +1276,6 @@ public class WindowManagerService extends IWindowManager.Stub return -1; } private void addInputMethodWindowToListLocked(WindowState win) { int pos = findDesiredInputMethodWindowIndexLocked(true); if (pos >= 0) { if (DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v( TAG_WM, "Adding input method window " + win + " at " + pos); // TODO(multidisplay): IMEs are only supported on the default display. getDefaultWindowListLocked().add(pos, win); mWindowsChanged = true; moveInputMethodDialogsLocked(pos + 1); return; } win.mToken.addWindow(win); moveInputMethodDialogsLocked(pos); } private void reAddWindowToListInOrderLocked(WindowState win) { win.mToken.addWindow(win); // This is a hack to get all of the child windows added as well at the right position. Child Loading @@ -1305,7 +1290,7 @@ public class WindowManagerService extends IWindowManager.Stub } } void logWindowList(final WindowList windows, String prefix) { private void logWindowList(final WindowList windows, String prefix) { int N = windows.size(); while (N > 0) { N--; Loading Loading @@ -1746,7 +1731,7 @@ public class WindowManagerService extends IWindowManager.Stub if (type == TYPE_INPUT_METHOD) { win.mGivenInsetsPending = true; mInputMethodWindow = win; addInputMethodWindowToListLocked(win); win.mToken.addImeWindow(win); imMayMove = false; } else if (type == TYPE_INPUT_METHOD_DIALOG) { mInputMethodDialogs.add(win); Loading Loading @@ -1980,7 +1965,7 @@ public class WindowManagerService extends IWindowManager.Stub } } public void removeWindow(Session session, IWindow client) { void removeWindow(Session session, IWindow client) { synchronized(mWindowMap) { WindowState win = windowForClientLocked(session, client, false); if (win == null) { Loading
services/core/java/com/android/server/wm/WindowToken.java +19 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,25 @@ class WindowToken extends WindowContainer<WindowState> { } } void addImeWindow(WindowState win) { int pos = mService.findDesiredInputMethodWindowIndexLocked(true); if (pos < 0) { addWindow(win); mService.moveInputMethodDialogsLocked(pos); return; } if (DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG_WM, "Adding input method window " + win + " at " + pos); mDisplayContent.addToWindowList(win, pos); if (!mChildren.contains(win)) { addChild(win, null); } mService.mWindowsChanged = true; mService.moveInputMethodDialogsLocked(pos + 1); } /** Return the first window in the token window list that isn't a starting window or null. */ WindowState getFirstNonStartingWindow() { final int count = mChildren.size(); Loading