Merge "Don't crop windows not on defualt display to stack bounds." into nyc-dev

This commit is contained in:
TreeHugger Robot
2016-04-19 21:38:29 +00:00
committed by Android (Google) Code Review
2 changed files with 14 additions and 0 deletions

View File

@@ -2382,6 +2382,9 @@ final class WindowState implements WindowManagerPolicy.WindowState {
if (stack != null) { if (stack != null) {
pw.print(" stackId="); pw.print(stack.mStackId); pw.print(" stackId="); pw.print(stack.mStackId);
} }
if (mNotOnAppsDisplay) {
pw.print(" mNotOnAppsDisplay="); pw.print(mNotOnAppsDisplay);
}
pw.print(" mSession="); pw.print(mSession); pw.print(" mSession="); pw.print(mSession);
pw.print(" mClient="); pw.println(mClient.asBinder()); pw.print(" mClient="); pw.println(mClient.asBinder());
pw.print(prefix); pw.print("mOwnerUid="); pw.print(mOwnerUid); pw.print(prefix); pw.print("mOwnerUid="); pw.print(mOwnerUid);

View File

@@ -1290,6 +1290,17 @@ class WindowStateAnimator {
} }
private void adjustCropToStackBounds(WindowState w, Rect clipRect, Rect finalClipRect, private void adjustCropToStackBounds(WindowState w, Rect clipRect, Rect finalClipRect,
boolean isFreeformResizing) { boolean isFreeformResizing) {
final DisplayContent displayContent = w.getDisplayContent();
if (displayContent != null && !displayContent.isDefaultDisplay) {
// There are some windows that live on other displays while their app and main window
// live on the default display (e.g. casting...). We don't want to crop this windows
// to the stack bounds which is only currently supported on the default display.
// TODO(multi-display): Need to support cropping to stack bounds on other displays
// when we have stacks on other displays.
return;
}
final Task task = w.getTask(); final Task task = w.getTask();
if (task == null || !task.cropWindowsToStackBounds()) { if (task == null || !task.cropWindowsToStackBounds()) {
return; return;