diff options
author | 2015-12-18 19:47:13 +0000 | |
---|---|---|
committer | 2015-12-18 19:47:13 +0000 | |
commit | 1d0d4d3c6e746d7dbe11a1ba77638ce44e7c8ddf (patch) | |
tree | 74d8d939ac45a2b950196d49ea3b036a526b4cc5 | |
parent | 374e7ddce2bff8bcef67042e988fdd5477331232 (diff) | |
parent | 8216eb2221ad5ad6615d3966f43844268756f3c8 (diff) |
Merge "Added PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME window flag"
-rw-r--r-- | core/java/android/view/WindowManager.java | 7 | ||||
-rw-r--r-- | core/java/android/widget/PopupWindow.java | 4 | ||||
-rw-r--r-- | services/core/java/com/android/server/wm/WindowState.java | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 2e884ccc7b25..251f4c802ce6 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -1183,6 +1183,13 @@ public interface WindowManager extends ViewManager { public static final int PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH = 0x00008000; /** + * Flag to indicate that this child window should always be laid-out in the parent + * frame regardless of the current windowing mode configuration. + * @hide + */ + public static final int PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME = 0x00010000; + + /** * Control flags that are private to the platform. * @hide */ diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java index f4c343a9509a..19e290b71a97 100644 --- a/core/java/android/widget/PopupWindow.java +++ b/core/java/android/widget/PopupWindow.java @@ -16,6 +16,7 @@ package android.widget; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH; import com.android.internal.R; @@ -1313,7 +1314,8 @@ public class PopupWindow { p.width = mLastWidth = mWidth; } - p.privateFlags = PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH; + p.privateFlags = PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH + | PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME; // Used for debugging. p.setTitle("PopupWindow:" + Integer.toHexString(hashCode())); diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 498259f4cfa6..c63618527910 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -74,6 +74,7 @@ import static android.view.WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON; import static android.view.WindowManager.LayoutParams.LAST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.MATCH_PARENT; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; @@ -606,7 +607,8 @@ final class WindowState implements WindowManagerPolicy.WindowState { final boolean fullscreenTask = task == null || task.isFullscreen(); final boolean freeformWorkspace = task != null && task.inFreeformWorkspace(); - if (fullscreenTask || isChildWindow()) { + if (fullscreenTask || (isChildWindow() + && (mAttrs.privateFlags & PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME) != 0)) { // We use the parent frame as the containing frame for fullscreen and child windows mContainingFrame.set(pf); mDisplayFrame.set(df); |