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

Commit 8ecb7d17 authored by Rob Carr's avatar Rob Carr Committed by android-build-merger
Browse files

Merge "Ensure we leave the orientation changing state." into oc-dr1-dev

am: 1eee2b49

Change-Id: Ie1a14214b36fccac44a97a755cf980b7ae6c2310
parents 8c7bf681 1eee2b49
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2681,7 +2681,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
            if (!w.getOrientationChanging()) {
                return;
            }
            w.setOrientationChanging(false);
            w.orientationChangeTimedOut();
            w.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime()
                    - mService.mDisplayFreezeTime);
            Slog.w(TAG_WM, "Force clearing orientation change: " + w);
+18 −1
Original line number Diff line number Diff line
@@ -443,6 +443,17 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
     */
    private boolean mOrientationChanging;

    /**
     * Sometimes in addition to the mOrientationChanging
     * flag we report that the orientation is changing
     * due to a mismatch in current and reported configuration.
     *
     * In the case of timeout we still need to make sure we
     * leave the orientation changing state though, so we
     * use this as a special time out escape hatch.
     */
    private boolean mOrientationChangeTimedOut;

    /**
     * The orientation during the last visible call to relayout. If our
     * current orientation is different, the window can't be ready
@@ -1221,11 +1232,17 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        //                   better indicator consistent with the client.
        return (mOrientationChanging || (isVisible()
                && getConfiguration().orientation != mLastReportedConfiguration.orientation))
                && !mSeamlesslyRotated;
                && !mSeamlesslyRotated
                && !mOrientationChangeTimedOut;
    }

    void setOrientationChanging(boolean changing) {
        mOrientationChanging = changing;
        mOrientationChangeTimedOut = false;
    }

    void orientationChangeTimedOut() {
        mOrientationChangeTimedOut = true;
    }

    DisplayContent getDisplayContent() {