From 7cd4b01af3ae88f9db036510f4769c27f45bb4b2 Mon Sep 17 00:00:00 2001 From: Wale Ogunwale Date: Sat, 7 May 2016 12:41:22 -0700 Subject: [PATCH] Fixed bug with pop-up window placement at the bottom in split-screen WindowState.mInsetFrame is used to represent a temp. offset of a task due to something like docked stack resizing or IME currently on screen. In the case of pop-up windows (or any child window that wants to layout in the parent frame) we were incorrectly setting the containing frame because we were checking to see if the mInsetFrame wasn't empty. This check isn't needed for child windows that want to layout in parent frame because the parent frame will already have the mInsetFrame applied to its frame which will automatically trickle down to the display and content frame it forwards to its child windows to use. Bug: 28389714 Change-Id: If89d40845a5a14aa60abcdedef2385b1fe7bfee3 --- services/core/java/com/android/server/wm/WindowState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index e73d547a7b871..56692ee52c1cb 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -697,7 +697,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { // The offset from the layout containing frame to the actual containing frame. final int layoutXDiff; final int layoutYDiff; - if (mInsetFrame.isEmpty() && (fullscreenTask || layoutInParentFrame())) { + if (fullscreenTask || layoutInParentFrame()) { // We use the parent frame as the containing frame for fullscreen and child windows mContainingFrame.set(pf); mDisplayFrame.set(df);