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

Commit b7b4a56a authored by Chong Zhang's avatar Chong Zhang
Browse files

Fix restoring surface for child windows

Use allAppWindows instead of windows, as windows doesn't contain
any child windows, it causes the child windows to be not restored
until the child window does relayout.

bug: 28296945

Change-Id: I7d272e660752002c08349128c3958aa041979c34
parent c39532df
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -390,8 +390,8 @@ class AppWindowToken extends WindowToken {
    }

    boolean hasSavedSurface() {
        for (int i = windows.size() -1; i >= 0; i--) {
            final WindowState ws = windows.get(i);
        for (int i = allAppWindows.size() -1; i >= 0; i--) {
            final WindowState ws = allAppWindows.get(i);
            if (ws.hasSavedSurface()) {
                return true;
            }
@@ -408,8 +408,8 @@ class AppWindowToken extends WindowToken {
        // Check if we have enough drawn windows to mark allDrawn= true.
        int numInteresting = 0;
        int numDrawn = 0;
        for (int i = windows.size() - 1; i >= 0; i--) {
            WindowState w = windows.get(i);
        for (int i = allAppWindows.size() - 1; i >= 0; i--) {
            WindowState w = allAppWindows.get(i);
            if (w.hasSavedSurface()) {
                w.restoreSavedSurface();
            }
@@ -429,8 +429,8 @@ class AppWindowToken extends WindowToken {
    }

    void destroySavedSurfaces() {
        for (int i = windows.size() - 1; i >= 0; i--) {
            WindowState win = windows.get(i);
        for (int i = allAppWindows.size() - 1; i >= 0; i--) {
            WindowState win = allAppWindows.get(i);
            win.destroySavedSurface();
        }
        mAnimatingWithSavedSurface = false;