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

Commit 39e88197 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Added missing lock and clean up locked function that wasn't locked" into oc-dev

parents 59e16c9e d7988534
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -3824,20 +3824,22 @@ public class WindowManagerService extends IWindowManager.Stub
        long origId = Binder.clearCallingIdentity();

        try {
            final boolean rotationChanged;
            // TODO(multi-display): Update rotation for different displays separately.
            final DisplayContent displayContent = getDefaultDisplayContentLocked();
            final boolean rotationChanged;
            final int displayId;
            synchronized (mWindowMap) {
                final DisplayContent displayContent = getDefaultDisplayContentLocked();
                rotationChanged = displayContent.updateRotationUnchecked(
                        false /* inTransaction */);
                if (!rotationChanged || forceRelayout) {
                    getDefaultDisplayContentLocked().setLayoutNeeded();
                    displayContent.setLayoutNeeded();
                    mWindowPlacerLocked.performSurfacePlacement();
                }
                displayId = displayContent.getDisplayId();
            }

            if (rotationChanged || alwaysSendConfiguration) {
                sendNewConfiguration(displayContent.getDisplayId());
                sendNewConfiguration(displayId);
            }
        } finally {
            Binder.restoreCallingIdentity(origId);
@@ -6898,10 +6900,12 @@ public class WindowManagerService extends IWindowManager.Stub
                "registerDockedStackListener()")) {
            return;
        }
        synchronized (mWindowMap) {
            // TODO(multi-display): The listener is registered on the default display only.
            getDefaultDisplayContentLocked().mDividerControllerLocked.registerDockedStackListener(
                    listener);
        }
    }

    @Override
    public void registerPinnedStackListener(int displayId, IPinnedStackListener listener) {