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

Commit 947277bc authored by Oleg Blinnikov's avatar Oleg Blinnikov Committed by Android (Google) Code Review
Browse files

Merge "Call onPresentation on success only" into main

parents 40633698 d38954b2
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1551,11 +1551,6 @@ public class WindowManagerService extends IWindowManager.Stub
                return WindowManagerGlobal.ADD_DUPLICATE_ADD;
            }

            if (type == TYPE_PRESENTATION || type == TYPE_PRIVATE_PRESENTATION) {
                mDisplayManagerInternal.onPresentation(displayContent.getDisplay().getDisplayId(),
                        /*isShown=*/ true);
            }

            if (type == TYPE_PRIVATE_PRESENTATION && !displayContent.isPrivate()) {
                ProtoLog.w(WM_ERROR,
                        "Attempted to add private presentation window to a non-private display.  "
@@ -1906,6 +1901,12 @@ public class WindowManagerService extends IWindowManager.Stub
                outAttachedFrame.set(0, 0, -1, -1);
            }
            outSizeCompatScale[0] = win.getCompatScaleForClient();

            if (res >= ADD_OKAY
                    && (type == TYPE_PRESENTATION || type == TYPE_PRIVATE_PRESENTATION)) {
                mDisplayManagerInternal.onPresentation(displayContent.getDisplay().getDisplayId(),
                        /*isShown=*/ true);
            }
        }

        Binder.restoreCallingIdentity(origId);