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

Commit 48a11073 authored by Kazuki Takise's avatar Kazuki Takise Committed by Android (Google) Code Review
Browse files

Merge "Split core window addition logic into addWindowInner()" into main

parents bced74f7 7470419c
Loading
Loading
Loading
Loading
+113 −100
Original line number Diff line number Diff line
@@ -1820,6 +1820,22 @@ public class WindowManagerService extends IWindowManager.Stub
            final boolean hideSystemAlertWindows = shouldHideNonSystemOverlayWindow(win);
            win.setForceHideNonSystemOverlayWindowIfNeeded(hideSystemAlertWindows);

            res |= addWindowInner(win, displayPolicy, activity, displayContent, outInsetsState,
                    outAttachedFrame, outActiveControls, client, outSizeCompatScale, attrs);
        }

        Binder.restoreCallingIdentity(origId);

        return res;
    }

    private int addWindowInner(@NonNull WindowState win, @NonNull DisplayPolicy displayPolicy,
            @NonNull ActivityRecord activity, @NonNull DisplayContent displayContent,
            @NonNull InsetsState outInsetsState, @NonNull Rect outAttachedFrame,
            @NonNull InsetsSourceControl.Array outActiveControls, @NonNull IWindow client,
            @NonNull float[] outSizeCompatScale, @NonNull LayoutParams attrs) {
        int res = 0;
        final int type = attrs.type;
        boolean imMayMove = true;

        win.mToken.addWindow(win);
@@ -1936,9 +1952,6 @@ public class WindowManagerService extends IWindowManager.Stub
        if (res >= ADD_OKAY && win.isPresentation()) {
            mPresentationController.onPresentationAdded(win);
        }
        }

        Binder.restoreCallingIdentity(origId);

        return res;
    }