Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d0d4d3c authored by Wale Ogunwale's avatar Wale Ogunwale Committed by Android (Google) Code Review
Browse files

Merge "Added PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME window flag"

parents 374e7ddc 8216eb22
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -1182,6 +1182,13 @@ public interface WindowManager extends ViewManager {
         */
         */
        public static final int PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH = 0x00008000;
        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.
         * Control flags that are private to the platform.
         * @hide
         * @hide
+3 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


package android.widget;
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 static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH;


import com.android.internal.R;
import com.android.internal.R;
@@ -1313,7 +1314,8 @@ public class PopupWindow {
            p.width = mLastWidth = mWidth;
            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.
        // Used for debugging.
        p.setTitle("PopupWindow:" + Integer.toHexString(hashCode()));
        p.setTitle("PopupWindow:" + Integer.toHexString(hashCode()));
+3 −1
Original line number Original line Diff line number Diff line
@@ -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.LAST_SUB_WINDOW;
import static android.view.WindowManager.LayoutParams.MATCH_PARENT;
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_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_KEYGUARD;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH;
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
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 fullscreenTask = task == null || task.isFullscreen();
        final boolean freeformWorkspace = task != null && task.inFreeformWorkspace();
        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
            // We use the parent frame as the containing frame for fullscreen and child windows
            mContainingFrame.set(pf);
            mContainingFrame.set(pf);
            mDisplayFrame.set(df);
            mDisplayFrame.set(df);