Fix issue with PiP hiding when dragging divider.

- Prevent the PiP windows from being set to drag resizing and getting
  clipped.

Test: Open PiP, dock a window, and start interacting with the divider.
Change-Id: I6a28a139261f1c3c09ec2b027e438df0411987c1
This commit is contained in:
Winson Chung
2017-01-24 16:21:13 -08:00
parent 6d2fe9e96d
commit 2af04b31d9
2 changed files with 10 additions and 1 deletions

View File

@@ -697,6 +697,13 @@ public class ActivityManager {
&& stackId != DOCKED_STACK_ID && stackId != PINNED_STACK_ID;
}
/**
* Returns true if the input stack is affected by drag resizing.
*/
public static boolean isStackAffectedByDragResizing(int stackId) {
return isStaticStack(stackId) && stackId != PINNED_STACK_ID;
}
/**
* Returns true if the windows of tasks being moved to the target stack from the source
* stack should be replaced, meaning that window manager will keep the old window around

View File

@@ -3198,8 +3198,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
if (task == null) {
return false;
}
if (!StackId.isStackAffectedByDragResizing(getStackId())) {
return false;
}
if (mAttrs.width != MATCH_PARENT || mAttrs.height != MATCH_PARENT) {
// Floating windows never enter drag resize mode.
return false;
}