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

Commit 2c43c9ef authored by Garfield Tan's avatar Garfield Tan
Browse files

Clear calling id in dontOverrideDisplayInfo.

It might create DisplayContent in some cases where WM may need to do
something only privileged processes are allowed to do.

Bug: 111840884
Test: dontOverrideDisplayInfo succeeds with the freeform windowing mode
CL.

Change-Id: I09b32c8fa2be4bd775a11e884c81cc38cb2c2368
parent 54e83cd0
Loading
Loading
Loading
Loading
+18 −13
Original line number Diff line number Diff line
@@ -7090,6 +7090,8 @@ public class WindowManagerService extends IWindowManager.Stub

    @Override
    public void dontOverrideDisplayInfo(int displayId) {
        final long token = Binder.clearCallingIdentity();
        try {
            synchronized (mWindowMap) {
                final DisplayContent dc = getDisplayContentOrCreate(displayId);
                if (dc == null) {
@@ -7104,6 +7106,9 @@ public class WindowManagerService extends IWindowManager.Stub
                mDisplayManagerInternal.setDisplayInfoOverrideFromWindowManager(displayId,
                        null /* info */);
            }
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }

    @Override