summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/ViewRootImpl.java11
-rw-r--r--core/java/com/android/internal/os/SomeArgs.java1
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java4
3 files changed, 14 insertions, 2 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 5715f6597750..ea42399a07eb 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -287,6 +287,7 @@ public final class ViewRootImpl implements ViewParent,
final Rect mPendingStableInsets = new Rect();
final Rect mPendingContentInsets = new Rect();
final Rect mPendingOutsets = new Rect();
+ final Rect mPendingBackDropFrame = new Rect();
final ViewTreeObserver.InternalInsetsInfo mLastGivenInsets
= new ViewTreeObserver.InternalInsetsInfo();
@@ -1553,6 +1554,10 @@ public final class ViewRootImpl implements ViewParent,
frame.height() < desiredWindowHeight && frame.height() != mHeight));
windowShouldResize |= mDragResizing;
+ // If the backdrop frame doesn't equal to a frame, we are starting a resize operation, so
+ // force it to be resized.
+ windowShouldResize |= !mPendingBackDropFrame.equals(mWinFrame);
+
// Determine whether to compute insets.
// If there are no inset listeners remaining then we may still need to compute
// insets in case the old insets were non-empty and must be reset.
@@ -1733,7 +1738,7 @@ public final class ViewRootImpl implements ViewParent,
& WindowManagerGlobal.RELAYOUT_RES_DRAG_RESIZING) != 0;
if (mDragResizing != dragResizing) {
if (dragResizing) {
- startDragResizing(frame);
+ startDragResizing(mPendingBackDropFrame);
} else {
// We shouldn't come here, but if we come we should end the resize.
endDragResizing();
@@ -3269,6 +3274,7 @@ public final class ViewRootImpl implements ViewParent,
mPendingStableInsets.set((Rect) args.arg6);
mPendingVisibleInsets.set((Rect) args.arg3);
mPendingOutsets.set((Rect) args.arg7);
+ mPendingBackDropFrame.set((Rect) args.arg8);
args.recycle();
@@ -3294,6 +3300,8 @@ public final class ViewRootImpl implements ViewParent,
mWinFrame.top = t;
mWinFrame.bottom = t + h;
+ mPendingBackDropFrame.set(mWinFrame);
+
if (mView != null) {
forceLayout(mView);
}
@@ -5679,6 +5687,7 @@ public final class ViewRootImpl implements ViewParent,
args.arg5 = sameProcessCall ? new Rect(overscanInsets) : overscanInsets;
args.arg6 = sameProcessCall ? new Rect(stableInsets) : stableInsets;
args.arg7 = sameProcessCall ? new Rect(outsets) : outsets;
+ args.arg8 = sameProcessCall ? new Rect(backDropFrame) : backDropFrame;
msg.obj = args;
mHandler.sendMessage(msg);
}
diff --git a/core/java/com/android/internal/os/SomeArgs.java b/core/java/com/android/internal/os/SomeArgs.java
index c05e0d8f1256..8fb56d4757b6 100644
--- a/core/java/com/android/internal/os/SomeArgs.java
+++ b/core/java/com/android/internal/os/SomeArgs.java
@@ -47,6 +47,7 @@ public final class SomeArgs {
public Object arg5;
public Object arg6;
public Object arg7;
+ public Object arg8;
public int argi1;
public int argi2;
public int argi3;
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 7bee7fd994e3..39bab7d23b0c 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -1878,8 +1878,10 @@ final class WindowState implements WindowManagerPolicy.WindowState {
Configuration newConfig) throws RemoteException {
DisplayInfo displayInfo = getDisplayInfo();
mTmpRect.set(0, 0, displayInfo.logicalWidth, displayInfo.logicalHeight);
+ boolean resizing = computeDragResizing();
mClient.resized(frame, overscanInsets, contentInsets, visibleInsets, stableInsets,
- outsets, reportDraw, newConfig, inFreeformWorkspace() ? frame : mTmpRect);
+ outsets, reportDraw, newConfig, inFreeformWorkspace() || !resizing
+ ? frame : mTmpRect);
}
public void registerFocusObserver(IWindowFocusObserver observer) {