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

Commit 0239aff3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ensure that floating windows on Wear can be non-fullscreen" into main

parents fc69cf23 62792028
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2513,9 +2513,16 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        }

        mIsFloating = a.getBoolean(R.styleable.Window_windowIsFloating, false);

        // For floating windows that are *allowed* to fill the screen (like Wear) content
        // should still be wrapped if they're not explicitly requested as fullscreen.
        final boolean isFloatingAndFullscreen = mIsFloating
                && mAllowFloatingWindowsFillScreen
                && a.getBoolean(R.styleable.Window_windowFullscreen, false);

        int flagsToUpdate = (FLAG_LAYOUT_IN_SCREEN|FLAG_LAYOUT_INSET_DECOR)
                & (~getForcedWindowFlags());
        if (mIsFloating && !mAllowFloatingWindowsFillScreen) {
        if (mIsFloating && !isFloatingAndFullscreen) {
            setLayout(WRAP_CONTENT, WRAP_CONTENT);
            setFlags(0, flagsToUpdate);
        } else {