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

Commit 24421e77 authored by Rob Carr's avatar Rob Carr Committed by android-build-merger
Browse files

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

Merge "Merge "Ensure we leave the orientation changing state." into oc-dr1-dev am: 1eee2b49" into oc-mr1-dev am: 366f8b43
am: 1217a8e9

Change-Id: I06219bc27be62dcccee3211e9913e8ccfe79ca7f
parents 67dba82c 1217a8e9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2681,7 +2681,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
            if (!w.getOrientationChanging()) {
            if (!w.getOrientationChanging()) {
                return;
                return;
            }
            }
            w.setOrientationChanging(false);
            w.orientationChangeTimedOut();
            w.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime()
            w.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime()
                    - mService.mDisplayFreezeTime);
                    - mService.mDisplayFreezeTime);
            Slog.w(TAG_WM, "Force clearing orientation change: " + w);
            Slog.w(TAG_WM, "Force clearing orientation change: " + w);
+18 −1
Original line number Original line Diff line number Diff line
@@ -448,6 +448,17 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
     */
     */
    private boolean mOrientationChanging;
    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
     * The orientation during the last visible call to relayout. If our
     * current orientation is different, the window can't be ready
     * current orientation is different, the window can't be ready
@@ -1226,11 +1237,17 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        //                   better indicator consistent with the client.
        //                   better indicator consistent with the client.
        return (mOrientationChanging || (isVisible()
        return (mOrientationChanging || (isVisible()
                && getConfiguration().orientation != mLastReportedConfiguration.orientation))
                && getConfiguration().orientation != mLastReportedConfiguration.orientation))
                && !mSeamlesslyRotated;
                && !mSeamlesslyRotated
                && !mOrientationChangeTimedOut;
    }
    }


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

    void orientationChangeTimedOut() {
        mOrientationChangeTimedOut = true;
    }
    }


    DisplayContent getDisplayContent() {
    DisplayContent getDisplayContent() {