Loading services/core/java/com/android/server/wm/DisplayContent.java +1 −0 Original line number Diff line number Diff line Loading @@ -937,6 +937,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // so we still request the window to resize if the current frame is empty. if (!w.getFrame().isEmpty()) { w.updateLastFrames(); mWmService.mFrameChangingWindows.remove(w); } w.onResizeHandled(); } Loading services/core/java/com/android/server/wm/RootWindowContainer.java +12 −0 Original line number Diff line number Diff line Loading @@ -847,6 +847,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } handleResizingWindows(); clearFrameChangingWindows(); if (mWmService.mDisplayFrozen) { ProtoLog.v(WM_DEBUG_ORIENTATION, Loading Loading @@ -1014,6 +1015,17 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } } /** * Clears frame changing windows after handling moving and resizing windows. */ private void clearFrameChangingWindows() { final ArrayList<WindowState> frameChangingWindows = mWmService.mFrameChangingWindows; for (int i = frameChangingWindows.size() - 1; i >= 0; i--) { frameChangingWindows.get(i).updateLastFrames(); } frameChangingWindows.clear(); } /** * @param w WindowState this method is applied to. * @param obscured True if there is a window on top of this obscuring the display. Loading services/core/java/com/android/server/wm/WindowFrames.java +2 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,8 @@ public class WindowFrames { final Rect mFrame = new Rect(); /** * The last real frame that was reported to the client. * The frame used to check if mFrame is changed, e.g., moved or resized. It will be committed * after handling the moving or resizing windows. */ final Rect mLastFrame = new Rect(); Loading services/core/java/com/android/server/wm/WindowManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -587,6 +587,12 @@ public class WindowManagerService extends IWindowManager.Stub */ final ArrayList<WindowState> mResizingWindows = new ArrayList<>(); /** * Windows that their frames are being changed. Used so we can clear the frame-changing states * after handling the moved or resized windows. */ final ArrayList<WindowState> mFrameChangingWindows = new ArrayList<>(); /** * Mapping of displayId to {@link DisplayImePolicy}. * Note that this can be accessed without holding the lock. Loading services/core/java/com/android/server/wm/WindowState.java +5 −4 Original line number Diff line number Diff line Loading @@ -1347,6 +1347,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP windowFrames.setContentChanged(true); } if (!windowFrames.mFrame.equals(windowFrames.mLastFrame) || !windowFrames.mRelFrame.equals(windowFrames.mLastRelFrame)) { mWmService.mFrameChangingWindows.add(this); } if (mAttrs.type == TYPE_DOCK_DIVIDER) { if (!windowFrames.mFrame.equals(windowFrames.mLastFrame)) { mMovedByResize = true; Loading Loading @@ -3717,10 +3722,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mDragResizingChangeReported = true; mWindowFrames.clearReportResizeHints(); // We update mLastFrame always rather than in the conditional with the last inset // variables, because mFrameSizeChanged only tracks the width and height changing. updateLastFrames(); final int prevRotation = mLastReportedConfiguration .getMergedConfiguration().windowConfiguration.getRotation(); fillClientWindowFramesAndConfiguration(mClientWindowFrames, mLastReportedConfiguration, Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +1 −0 Original line number Diff line number Diff line Loading @@ -937,6 +937,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // so we still request the window to resize if the current frame is empty. if (!w.getFrame().isEmpty()) { w.updateLastFrames(); mWmService.mFrameChangingWindows.remove(w); } w.onResizeHandled(); } Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +12 −0 Original line number Diff line number Diff line Loading @@ -847,6 +847,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } handleResizingWindows(); clearFrameChangingWindows(); if (mWmService.mDisplayFrozen) { ProtoLog.v(WM_DEBUG_ORIENTATION, Loading Loading @@ -1014,6 +1015,17 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } } /** * Clears frame changing windows after handling moving and resizing windows. */ private void clearFrameChangingWindows() { final ArrayList<WindowState> frameChangingWindows = mWmService.mFrameChangingWindows; for (int i = frameChangingWindows.size() - 1; i >= 0; i--) { frameChangingWindows.get(i).updateLastFrames(); } frameChangingWindows.clear(); } /** * @param w WindowState this method is applied to. * @param obscured True if there is a window on top of this obscuring the display. Loading
services/core/java/com/android/server/wm/WindowFrames.java +2 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,8 @@ public class WindowFrames { final Rect mFrame = new Rect(); /** * The last real frame that was reported to the client. * The frame used to check if mFrame is changed, e.g., moved or resized. It will be committed * after handling the moving or resizing windows. */ final Rect mLastFrame = new Rect(); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -587,6 +587,12 @@ public class WindowManagerService extends IWindowManager.Stub */ final ArrayList<WindowState> mResizingWindows = new ArrayList<>(); /** * Windows that their frames are being changed. Used so we can clear the frame-changing states * after handling the moved or resized windows. */ final ArrayList<WindowState> mFrameChangingWindows = new ArrayList<>(); /** * Mapping of displayId to {@link DisplayImePolicy}. * Note that this can be accessed without holding the lock. Loading
services/core/java/com/android/server/wm/WindowState.java +5 −4 Original line number Diff line number Diff line Loading @@ -1347,6 +1347,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP windowFrames.setContentChanged(true); } if (!windowFrames.mFrame.equals(windowFrames.mLastFrame) || !windowFrames.mRelFrame.equals(windowFrames.mLastRelFrame)) { mWmService.mFrameChangingWindows.add(this); } if (mAttrs.type == TYPE_DOCK_DIVIDER) { if (!windowFrames.mFrame.equals(windowFrames.mLastFrame)) { mMovedByResize = true; Loading Loading @@ -3717,10 +3722,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mDragResizingChangeReported = true; mWindowFrames.clearReportResizeHints(); // We update mLastFrame always rather than in the conditional with the last inset // variables, because mFrameSizeChanged only tracks the width and height changing. updateLastFrames(); final int prevRotation = mLastReportedConfiguration .getMergedConfiguration().windowConfiguration.getRotation(); fillClientWindowFramesAndConfiguration(mClientWindowFrames, mLastReportedConfiguration, Loading