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

Commit ade0a9a9 authored by Craig Mautner's avatar Craig Mautner
Browse files

Save resized windows even if freezing.

During app freezes resized windows were being dropped if the freeze
window timed out. This fix adds windows to the list of resized
windows but does not notify the clients of the resize until freezing
is completed.

Bug: 7094175 fixed.
Change-Id: Iee1f5f532a0e661fbf900e4540146ae4b645d68e
parent 1ad0fd9c
Loading
Loading
Loading
Loading
+35 −33
Original line number Original line Diff line number Diff line
@@ -8725,7 +8725,7 @@ public class WindowManagerService extends IWindowManager.Stub


    private void updateResizingWindows(final WindowState w) {
    private void updateResizingWindows(final WindowState w) {
        final WindowStateAnimator winAnimator = w.mWinAnimator;
        final WindowStateAnimator winAnimator = w.mWinAnimator;
        if (w.mHasSurface && !w.mAppFreezing && w.mLayoutSeq == mLayoutSeq) {
        if (w.mHasSurface && w.mLayoutSeq == mLayoutSeq) {
            w.mContentInsetsChanged |=
            w.mContentInsetsChanged |=
                    !w.mLastContentInsets.equals(w.mContentInsets);
                    !w.mLastContentInsets.equals(w.mContentInsets);
            w.mVisibleInsetsChanged |=
            w.mVisibleInsetsChanged |=
@@ -9260,9 +9260,12 @@ public class WindowManagerService extends IWindowManager.Stub
                    defaultDisplay.pendingLayoutChanges);
                    defaultDisplay.pendingLayoutChanges);
        }
        }


        if (!mResizingWindows.isEmpty()) {
        for (i = mResizingWindows.size() - 1; i >= 0; i--) {
        for (i = mResizingWindows.size() - 1; i >= 0; i--) {
            WindowState win = mResizingWindows.get(i);
            WindowState win = mResizingWindows.get(i);
            if (win.mAppFreezing) {
                // Don't remove this window until rotation has completed.
                continue;
            }
            final WindowStateAnimator winAnimator = win.mWinAnimator;
            final WindowStateAnimator winAnimator = win.mWinAnimator;
            try {
            try {
                if (DEBUG_RESIZE || DEBUG_ORIENTATION) Slog.v(TAG,
                if (DEBUG_RESIZE || DEBUG_ORIENTATION) Slog.v(TAG,
@@ -9291,8 +9294,7 @@ public class WindowManagerService extends IWindowManager.Stub
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                win.mOrientationChanging = false;
                win.mOrientationChanging = false;
            }
            }
            }
            mResizingWindows.remove(i);
            mResizingWindows.clear();
        }
        }


        if (DEBUG_ORIENTATION && mDisplayFrozen) Slog.v(TAG,
        if (DEBUG_ORIENTATION && mDisplayFrozen) Slog.v(TAG,