From 2c17cd254ba334462265c7b55938a7531545b2d3 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Fri, 8 Apr 2016 17:52:28 -0700 Subject: [PATCH] Only set mResizedWhileNotDragResizing for base windows. Dialogs, etc, may appear to not be drag resizing as they are not base windows. Still though, when they resize we don't want them to enter in to this mResizedWhileNotDragResizing mode or we will freeze surface boundary updates and lose the ability to crop them to the stack. Bug: 26668339 Change-Id: Id603816cf5f33b281f46c7812779ba29a024f34f --- services/core/java/com/android/server/wm/Task.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index ce82dbe09a979..bff431997e1cf 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -27,6 +27,7 @@ import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_STACK; import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME; import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM; import static com.android.server.wm.WindowManagerService.H.RESIZE_TASK; +import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import android.app.ActivityManager.StackId; import android.content.pm.ActivityInfo; @@ -574,7 +575,16 @@ class Task implements DimLayer.DimLayerUser { // If we are not drag resizing, force recreating of a new surface so updating // the content and positioning that surface will be in sync. - if (!win.computeDragResizing()) { + // + // As we use this flag as a hint to freeze surface boundary updates, + // we'd like to only apply this to TYPE_BASE_APPLICATION, + // windows of TYPE_APPLICATION like dialogs, could appear + // to not be drag resizing while they resize, but we'd + // still like to manipulate their frame to update crop, etc... + // + // Anyway we don't need to synchronize position and content updates for these + // windows since they aren't at the base layer and could be moved around anyway. + if (!win.computeDragResizing() && win.mAttrs.type == TYPE_BASE_APPLICATION) { win.mResizedWhileNotDragResizing = true; } }