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

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

Merge "Only reset layout seq when moved to a new display." into qt-dev

parents 48e0b6b9 e223e68d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1305,7 +1305,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    void onDisplayChanged(DisplayContent dc) {
        super.onDisplayChanged(dc);
        // Window was not laid out for this display yet, so make sure mLayoutSeq does not match.
        if (dc != null) {
        if (dc != null && mInputWindowHandle.displayId != dc.getDisplayId()) {
            mLayoutSeq = dc.mLayoutSeq - 1;
            mInputWindowHandle.displayId = dc.getDisplayId();
        }
+3 −1
Original line number Diff line number Diff line
@@ -397,7 +397,9 @@ public class WindowStateTests extends WindowTestsBase {
        app.mLayoutSeq = 1;
        mDisplayContent.mLayoutSeq = 1;

        app.onDisplayChanged(mDisplayContent);
        DisplayContent newDisplay = createNewDisplay();

        app.onDisplayChanged(newDisplay);

        assertThat(app.mLayoutSeq, not(is(mDisplayContent.mLayoutSeq)));
    }