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

Commit e061cc2e authored by Santos Cordon's avatar Santos Cordon Committed by android-build-merger
Browse files

Merge "Ensure that all displays are updated upon any changes to rotation." into oc-dr1-dev

am: adec8518

Change-Id: I70c521db6bb979e6276a57a2b818f050bb8fafae
parents cda30ced adec8518
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -747,14 +747,18 @@ class RootWindowContainer extends WindowContainer<DisplayContent> {

        if (mUpdateRotation) {
            if (DEBUG_ORIENTATION) Slog.d(TAG, "Performing post-rotate rotation");
            // TODO(multi-display): Update rotation for different displays separately.
            final int displayId = defaultDisplay.getDisplayId();
            if (defaultDisplay.updateRotationUnchecked(false /* inTransaction */)) {

            for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
                final DisplayContent displayContent = mChildren.get(displayNdx);
                final int displayId = displayContent.getDisplayId();
                if (displayContent.updateRotationUnchecked(false /* inTransaction */)) {
                    mService.mH.obtainMessage(SEND_NEW_CONFIGURATION, displayId).sendToTarget();
            } else {
                } else if (displayId == DEFAULT_DISPLAY) {
                    // TODO(multi-display): Track rotation updates for different displays separately
                    mUpdateRotation = false;
                }
            }
        }

        if (mService.mWaitingForDrawnCallback != null ||
                (mOrientationChangeComplete && !defaultDisplay.isLayoutNeeded()