From 031384556ede1678e9c7f5bff21a6b9eefb3502f Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Wed, 18 May 2016 14:53:16 -0700 Subject: [PATCH] Never set resized while not drag resizing for pinned stack. It's not necessary in the pinned stack and interferes with the animation. It's not enough to just check getBoundsAnimating, as we turn that off prior to the final resize so that we unmute notifications to the client. Bug: 28559097 Change-Id: Iae180c8a8ca0585184efcf24e7677557a33678eb --- services/core/java/com/android/server/wm/Task.java | 8 +++++++- 1 file changed, 7 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 f0808acee6361..b4387b98e6d7b 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -18,6 +18,7 @@ package com.android.server.wm; import static android.app.ActivityManager.RESIZE_MODE_SYSTEM_SCREEN_ROTATION; import static android.app.ActivityManager.StackId.DOCKED_STACK_ID; +import static android.app.ActivityManager.StackId.PINNED_STACK_ID; import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID; import static android.app.ActivityManager.StackId.HOME_STACK_ID; import static android.content.pm.ActivityInfo.RESIZE_MODE_CROP_WINDOWS; @@ -630,7 +631,8 @@ class Task implements DimLayer.DimLayerUser { // 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 && - !mStack.getBoundsAnimating() && !win.isGoneForLayoutLw()) { + !mStack.getBoundsAnimating() && !win.isGoneForLayoutLw() && + !inPinnedWorkspace()) { win.setResizedWhileNotDragResizing(true); } } @@ -710,6 +712,10 @@ class Task implements DimLayer.DimLayerUser { return mStack != null && mStack.mStackId == DOCKED_STACK_ID; } + boolean inPinnedWorkspace() { + return mStack != null && mStack.mStackId == PINNED_STACK_ID; + } + boolean isResizeableByDockedStack() { final DisplayContent displayContent = getDisplayContent(); return displayContent != null && displayContent.getDockedStackLocked() != null