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

Commit 6997bc0c authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Clear calling identity in replaceContentOnDisplay" into main

parents 0e1b17a1 1f5b7013
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -9591,14 +9591,18 @@ public class WindowManagerService extends IWindowManager.Stub
            throw new SecurityException("Requires ACCESS_SURFACE_FLINGER permission");
        }

        DisplayContent dc;
        final long origId = Binder.clearCallingIdentity();
        try {
            synchronized (mGlobalLock) {
            dc = mRoot.getDisplayContentOrCreate(displayId);
                DisplayContent dc = mRoot.getDisplayContentOrCreate(displayId);
                if (dc == null) {
                    return false;
                }
                dc.replaceContent(sc);
                return true;
            }
        } finally {
            Binder.restoreCallingIdentity(origId);
        }
    }
}