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

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

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

parents 0ee78fd3 34b09916
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()