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

Commit 3599e8a3 authored by Matthew Ng's avatar Matthew Ng Committed by android-build-merger
Browse files

Merge "Added missing lock and clean up locked function that wasn't locked"...

Merge "Added missing lock and clean up locked function that wasn't locked" into oc-dev am: 39e88197
am: 82db73bb

Change-Id: I65aff25a85b36a7c00dd778eb3f141530a86da90
parents d7454d03 82db73bb
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -3823,20 +3823,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);
@@ -6897,10 +6899,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) {