Loading core/java/android/view/SurfaceView.java +2 −1 Original line number Diff line number Diff line Loading @@ -456,11 +456,12 @@ public class SurfaceView extends View { } if (mWindow == null) { Display display = getDisplay(); mWindow = new MyWindow(this); mLayout.type = mWindowType; mLayout.gravity = Gravity.START|Gravity.TOP; mSession.addToDisplayWithoutInputChannel(mWindow, mWindow.mSeq, mLayout, mVisible ? VISIBLE : GONE, Display.DEFAULT_DISPLAY, mContentInsets); mVisible ? VISIBLE : GONE, display.getDisplayId(), mContentInsets); } boolean realSizeChanged; Loading services/java/com/android/server/wm/Session.java +3 −1 Original line number Diff line number Diff line Loading @@ -280,7 +280,8 @@ final class Session extends IWindowSession.Stub // !!! FIXME: put all this heavy stuff onto the mH looper, as well as // the actual drag event dispatch stuff in the dragstate mService.mDragState.register(callingWin.mDisplayContent.getDisplay()); Display display = callingWin.mDisplayContent.getDisplay(); mService.mDragState.register(display); mService.mInputMonitor.updateInputWindowsLw(true /*force*/); if (!mService.mInputManager.transferTouchFocus(callingWin.mInputChannel, mService.mDragState.mServerChannel)) { Loading Loading @@ -310,6 +311,7 @@ final class Session extends IWindowSession.Stub touchY - thumbCenterY); surface.setAlpha(.7071f); surface.setLayer(mService.mDragState.getDragLayerLw()); surface.setLayerStack(display.getLayerStack()); surface.show(); } finally { Surface.closeTransaction(); Loading services/java/com/android/server/wm/WindowManagerService.java +19 −14 Original line number Diff line number Diff line Loading @@ -9777,7 +9777,7 @@ public class WindowManagerService extends IWindowManager.Stub if (moveInputMethodWindowsIfNeededLocked( mode != UPDATE_FOCUS_WILL_ASSIGN_LAYERS && mode != UPDATE_FOCUS_WILL_PLACE_SURFACES)) { getDefaultDisplayContentLocked().layoutNeeded = true; displayContent.layoutNeeded = true; } if (mode == UPDATE_FOCUS_PLACING_SURFACES) { performLayoutLockedInner(displayContent, true /*initial*/, updateInputWindows); Loading @@ -9791,7 +9791,7 @@ public class WindowManagerService extends IWindowManager.Stub if ((focusChanged & WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT) != 0) { // The change in focus caused us to need to do a layout. Okay. getDefaultDisplayContentLocked().layoutNeeded = true; displayContent.layoutNeeded = true; if (mode == UPDATE_FOCUS_PLACING_SURFACES) { performLayoutLockedInner(displayContent, true /*initial*/, updateInputWindows); } Loading @@ -9814,22 +9814,29 @@ public class WindowManagerService extends IWindowManager.Stub } private WindowState computeFocusedWindowLocked() { WindowState result = null; WindowState win; if (mAnimator.mUniverseBackground != null && mAnimator.mUniverseBackground.mWin.canReceiveKeys()) { return mAnimator.mUniverseBackground.mWin; } final int displayCount = mDisplayContents.size(); for (int i = 0; i < displayCount; i++) { final DisplayContent displayContent = mDisplayContents.valueAt(i); WindowState win = findFocusedWindowLocked(displayContent); if (win != null) { return win; } } return null; } private WindowState findFocusedWindowLocked(DisplayContent displayContent) { int nextAppIndex = mAppTokens.size()-1; WindowToken nextApp = nextAppIndex >= 0 ? mAppTokens.get(nextAppIndex) : null; WindowToken nextApp = nextAppIndex >= 0 ? mAppTokens.get(nextAppIndex) : null; // TODO(multidisplay): IMEs are only supported on the default display. WindowList windows = getDefaultWindowListLocked(); final WindowList windows = displayContent.getWindowList(); for (int i = windows.size() - 1; i >= 0; i--) { win = windows.get(i); final WindowState win = windows.get(i); if (localLOGV || DEBUG_FOCUS) Slog.v( TAG, "Looking for focus: " + i Loading Loading @@ -9879,12 +9886,10 @@ public class WindowManagerService extends IWindowManager.Stub if (win.canReceiveKeys()) { if (DEBUG_FOCUS) Slog.v( TAG, "Found focus @ " + i + " = " + win); result = win; break; return win; } } return result; return null; } private void startFreezingDisplayLocked(boolean inTransaction, Loading Loading
core/java/android/view/SurfaceView.java +2 −1 Original line number Diff line number Diff line Loading @@ -456,11 +456,12 @@ public class SurfaceView extends View { } if (mWindow == null) { Display display = getDisplay(); mWindow = new MyWindow(this); mLayout.type = mWindowType; mLayout.gravity = Gravity.START|Gravity.TOP; mSession.addToDisplayWithoutInputChannel(mWindow, mWindow.mSeq, mLayout, mVisible ? VISIBLE : GONE, Display.DEFAULT_DISPLAY, mContentInsets); mVisible ? VISIBLE : GONE, display.getDisplayId(), mContentInsets); } boolean realSizeChanged; Loading
services/java/com/android/server/wm/Session.java +3 −1 Original line number Diff line number Diff line Loading @@ -280,7 +280,8 @@ final class Session extends IWindowSession.Stub // !!! FIXME: put all this heavy stuff onto the mH looper, as well as // the actual drag event dispatch stuff in the dragstate mService.mDragState.register(callingWin.mDisplayContent.getDisplay()); Display display = callingWin.mDisplayContent.getDisplay(); mService.mDragState.register(display); mService.mInputMonitor.updateInputWindowsLw(true /*force*/); if (!mService.mInputManager.transferTouchFocus(callingWin.mInputChannel, mService.mDragState.mServerChannel)) { Loading Loading @@ -310,6 +311,7 @@ final class Session extends IWindowSession.Stub touchY - thumbCenterY); surface.setAlpha(.7071f); surface.setLayer(mService.mDragState.getDragLayerLw()); surface.setLayerStack(display.getLayerStack()); surface.show(); } finally { Surface.closeTransaction(); Loading
services/java/com/android/server/wm/WindowManagerService.java +19 −14 Original line number Diff line number Diff line Loading @@ -9777,7 +9777,7 @@ public class WindowManagerService extends IWindowManager.Stub if (moveInputMethodWindowsIfNeededLocked( mode != UPDATE_FOCUS_WILL_ASSIGN_LAYERS && mode != UPDATE_FOCUS_WILL_PLACE_SURFACES)) { getDefaultDisplayContentLocked().layoutNeeded = true; displayContent.layoutNeeded = true; } if (mode == UPDATE_FOCUS_PLACING_SURFACES) { performLayoutLockedInner(displayContent, true /*initial*/, updateInputWindows); Loading @@ -9791,7 +9791,7 @@ public class WindowManagerService extends IWindowManager.Stub if ((focusChanged & WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT) != 0) { // The change in focus caused us to need to do a layout. Okay. getDefaultDisplayContentLocked().layoutNeeded = true; displayContent.layoutNeeded = true; if (mode == UPDATE_FOCUS_PLACING_SURFACES) { performLayoutLockedInner(displayContent, true /*initial*/, updateInputWindows); } Loading @@ -9814,22 +9814,29 @@ public class WindowManagerService extends IWindowManager.Stub } private WindowState computeFocusedWindowLocked() { WindowState result = null; WindowState win; if (mAnimator.mUniverseBackground != null && mAnimator.mUniverseBackground.mWin.canReceiveKeys()) { return mAnimator.mUniverseBackground.mWin; } final int displayCount = mDisplayContents.size(); for (int i = 0; i < displayCount; i++) { final DisplayContent displayContent = mDisplayContents.valueAt(i); WindowState win = findFocusedWindowLocked(displayContent); if (win != null) { return win; } } return null; } private WindowState findFocusedWindowLocked(DisplayContent displayContent) { int nextAppIndex = mAppTokens.size()-1; WindowToken nextApp = nextAppIndex >= 0 ? mAppTokens.get(nextAppIndex) : null; WindowToken nextApp = nextAppIndex >= 0 ? mAppTokens.get(nextAppIndex) : null; // TODO(multidisplay): IMEs are only supported on the default display. WindowList windows = getDefaultWindowListLocked(); final WindowList windows = displayContent.getWindowList(); for (int i = windows.size() - 1; i >= 0; i--) { win = windows.get(i); final WindowState win = windows.get(i); if (localLOGV || DEBUG_FOCUS) Slog.v( TAG, "Looking for focus: " + i Loading Loading @@ -9879,12 +9886,10 @@ public class WindowManagerService extends IWindowManager.Stub if (win.canReceiveKeys()) { if (DEBUG_FOCUS) Slog.v( TAG, "Found focus @ " + i + " = " + win); result = win; break; return win; } } return result; return null; } private void startFreezingDisplayLocked(boolean inTransaction, Loading