Merge "Clear mResizedWhileNotDragResizing flag after reporting" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
7fae7be595
@@ -631,7 +631,7 @@ class Task implements DimLayer.DimLayerUser {
|
|||||||
// windows since they aren't at the base layer and could be moved around anyway.
|
// windows since they aren't at the base layer and could be moved around anyway.
|
||||||
if (!win.computeDragResizing() && win.mAttrs.type == TYPE_BASE_APPLICATION &&
|
if (!win.computeDragResizing() && win.mAttrs.type == TYPE_BASE_APPLICATION &&
|
||||||
!mStack.getBoundsAnimating() && !win.isGoneForLayoutLw()) {
|
!mStack.getBoundsAnimating() && !win.isGoneForLayoutLw()) {
|
||||||
win.mResizedWhileNotDragResizing = true;
|
win.setResizedWhileNotDragResizing(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (win.isGoneForLayoutLw()) {
|
if (win.isGoneForLayoutLw()) {
|
||||||
|
|||||||
@@ -3066,9 +3066,9 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
|
|
||||||
// If we're starting a drag-resize, we'll be changing the surface size as well as
|
// If we're starting a drag-resize, we'll be changing the surface size as well as
|
||||||
// notifying the client to render to with an offset from the surface's top-left.
|
// notifying the client to render to with an offset from the surface's top-left.
|
||||||
if (win.isDragResizeChanged() || win.mResizedWhileNotDragResizing) {
|
if (win.isDragResizeChanged() || win.isResizedWhileNotDragResizing()) {
|
||||||
win.setDragResizing();
|
win.setDragResizing();
|
||||||
win.mResizedWhileNotDragResizing = false;
|
win.setResizedWhileNotDragResizing(false);
|
||||||
// We can only change top level windows to the full-screen surface when
|
// We can only change top level windows to the full-screen surface when
|
||||||
// resizing (as we only have one full-screen surface). So there is no need
|
// resizing (as we only have one full-screen surface). So there is no need
|
||||||
// to preserve and destroy windows which are attached to another, they
|
// to preserve and destroy windows which are attached to another, they
|
||||||
@@ -9272,7 +9272,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
|| w.mOutsetsChanged
|
|| w.mOutsetsChanged
|
||||||
|| configChanged
|
|| configChanged
|
||||||
|| dragResizingChanged
|
|| dragResizingChanged
|
||||||
|| w.mResizedWhileNotDragResizing) {
|
|| !w.isResizedWhileNotDragResizingReported()) {
|
||||||
if (DEBUG_RESIZE || DEBUG_ORIENTATION) {
|
if (DEBUG_RESIZE || DEBUG_ORIENTATION) {
|
||||||
Slog.v(TAG_WM, "Resize reasons for w=" + w + ": "
|
Slog.v(TAG_WM, "Resize reasons for w=" + w + ": "
|
||||||
+ " contentInsetsChanged=" + w.mContentInsetsChanged
|
+ " contentInsetsChanged=" + w.mContentInsetsChanged
|
||||||
@@ -9286,7 +9286,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
+ " surfaceResized=" + winAnimator.mSurfaceResized
|
+ " surfaceResized=" + winAnimator.mSurfaceResized
|
||||||
+ " configChanged=" + configChanged
|
+ " configChanged=" + configChanged
|
||||||
+ " dragResizingChanged=" + dragResizingChanged
|
+ " dragResizingChanged=" + dragResizingChanged
|
||||||
+ " resizedWhileNotDragResizing=" + w.mResizedWhileNotDragResizing);
|
+ " resizedWhileNotDragResizingReported="
|
||||||
|
+ w.isResizedWhileNotDragResizingReported());
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it's a dead window left on screen, and the configuration changed,
|
// If it's a dead window left on screen, and the configuration changed,
|
||||||
@@ -9308,7 +9309,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// we need to go through the process of getting informed by the
|
// we need to go through the process of getting informed by the
|
||||||
// application when it has finished drawing.
|
// application when it has finished drawing.
|
||||||
if (w.mOrientationChanging || dragResizingChanged
|
if (w.mOrientationChanging || dragResizingChanged
|
||||||
|| w.mResizedWhileNotDragResizing) {
|
|| w.isResizedWhileNotDragResizing()) {
|
||||||
if (DEBUG_SURFACE_TRACE || DEBUG_ANIM || DEBUG_ORIENTATION || DEBUG_RESIZE) {
|
if (DEBUG_SURFACE_TRACE || DEBUG_ANIM || DEBUG_ORIENTATION || DEBUG_RESIZE) {
|
||||||
Slog.v(TAG_WM, "Orientation or resize start waiting for draw"
|
Slog.v(TAG_WM, "Orientation or resize start waiting for draw"
|
||||||
+ ", mDrawState=DRAW_PENDING in " + w
|
+ ", mDrawState=DRAW_PENDING in " + w
|
||||||
|
|||||||
@@ -486,12 +486,11 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
|||||||
*/
|
*/
|
||||||
boolean mResizedWhileGone = false;
|
boolean mResizedWhileGone = false;
|
||||||
|
|
||||||
/**
|
/** @see #isResizedWhileNotDragResizing(). */
|
||||||
* Indicates whether we got resized but drag resizing flag was false. In this case, we also
|
private boolean mResizedWhileNotDragResizing;
|
||||||
* need to recreate the surface and defer surface bound updates in order to make sure the
|
|
||||||
* buffer contents and the positioning/size stay in sync.
|
/** @see #isResizedWhileNotDragResizingReported(). */
|
||||||
*/
|
private boolean mResizedWhileNotDragResizingReported;
|
||||||
boolean mResizedWhileNotDragResizing;
|
|
||||||
|
|
||||||
WindowState(WindowManagerService service, Session s, IWindow c, WindowToken token,
|
WindowState(WindowManagerService service, Session s, IWindow c, WindowToken token,
|
||||||
WindowState attachedWindow, int appOp, int seq, WindowManager.LayoutParams a,
|
WindowState attachedWindow, int appOp, int seq, WindowManager.LayoutParams a,
|
||||||
@@ -2326,6 +2325,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
|||||||
mVisibleInsetsChanged = false;
|
mVisibleInsetsChanged = false;
|
||||||
mStableInsetsChanged = false;
|
mStableInsetsChanged = false;
|
||||||
mOutsetsChanged = false;
|
mOutsetsChanged = false;
|
||||||
|
mResizedWhileNotDragResizingReported = true;
|
||||||
mWinAnimator.mSurfaceResized = false;
|
mWinAnimator.mSurfaceResized = false;
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
mOrientationChanging = false;
|
mOrientationChanging = false;
|
||||||
@@ -2428,6 +2428,32 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
|||||||
mDragResizingChangeReported = false;
|
mDragResizingChangeReported = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set whether we got resized but drag resizing flag was false.
|
||||||
|
* @see #isResizedWhileNotDragResizing().
|
||||||
|
*/
|
||||||
|
void setResizedWhileNotDragResizing(boolean resizedWhileNotDragResizing) {
|
||||||
|
mResizedWhileNotDragResizing = resizedWhileNotDragResizing;
|
||||||
|
mResizedWhileNotDragResizingReported = !resizedWhileNotDragResizing;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether we got resized but drag resizing flag was false. In this case, we also
|
||||||
|
* need to recreate the surface and defer surface bound updates in order to make sure the
|
||||||
|
* buffer contents and the positioning/size stay in sync.
|
||||||
|
*/
|
||||||
|
boolean isResizedWhileNotDragResizing() {
|
||||||
|
return mResizedWhileNotDragResizing;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Whether we reported "resize while not drag resizing" to the application.
|
||||||
|
* @see #isResizedWhileNotDragResizing()
|
||||||
|
*/
|
||||||
|
boolean isResizedWhileNotDragResizingReported() {
|
||||||
|
return mResizedWhileNotDragResizingReported;
|
||||||
|
}
|
||||||
|
|
||||||
int getResizeMode() {
|
int getResizeMode() {
|
||||||
return mResizeMode;
|
return mResizeMode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1408,7 +1408,7 @@ class WindowStateAnimator {
|
|||||||
final Task task = w.getTask();
|
final Task task = w.getTask();
|
||||||
|
|
||||||
// We got resized, so block all updates until we got the new surface.
|
// We got resized, so block all updates until we got the new surface.
|
||||||
if (w.mResizedWhileNotDragResizing && !w.isGoneForLayoutLw()) {
|
if (w.isResizedWhileNotDragResizing() && !w.isGoneForLayoutLw()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user