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

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

Merge "Fixed smoke test failures"

parents e0526686 fa854eba
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -564,10 +564,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        allDrawnExcludingSaved = false;
    }

    @Override
    void removeWindow(WindowState win) {
        super.removeWindow(win);

    void postWindowRemoveStartingWindowCleanup(WindowState win) {
        // TODO: Something smells about the code below...Is there a better way?
        if (startingWindow == win) {
            if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Notify removed startingWindow " + win);
@@ -933,7 +930,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
            mService.mWindowsChanged = true;
            if (DEBUG_ADD_REMOVE) Slog.v(TAG_WM,
                    "Removing starting " + tStartingWindow + " from " + fromToken);
            fromToken.removeWindow(tStartingWindow);
            fromToken.removeChild(tStartingWindow);
            fromToken.postWindowRemoveStartingWindowCleanup(tStartingWindow);
            addWindow(tStartingWindow);

            // Propagate other interesting state between the tokens. If the old token is displayed,
+2 −2
Original line number Diff line number Diff line
@@ -2054,7 +2054,7 @@ public class WindowManagerService extends IWindowManager.Stub
        final WindowToken token = win.mToken;
        final AppWindowToken atoken = win.mAppToken;
        if (DEBUG_ADD_REMOVE) Slog.v(TAG_WM, "Removing " + win + " from " + token);
        token.removeWindow(win);
        // Window will already be removed from token before this post clean-up method is called.
        if (token.isEmpty()) {
            if (!token.explicit) {
                mTokenMap.remove(token.token);
@@ -2067,7 +2067,7 @@ public class WindowManagerService extends IWindowManager.Stub
        }

        if (atoken != null) {
            atoken.removeWindow(win);
            atoken.postWindowRemoveStartingWindowCleanup(win);
        }

        if (win.mAttrs.type == TYPE_WALLPAPER) {
+3 −6
Original line number Diff line number Diff line
@@ -91,8 +91,10 @@ class WindowToken extends WindowContainer<WindowState> {
            final WindowState win = mChildren.get(i);
            if (DEBUG_WINDOW_MOVEMENT) Slog.w(TAG_WM, "removeAllWindows: removing win=" + win);
            win.removeIfPossible();
            if (mChildren.contains(win)) {
                removeChild(win);
            }
        }
        mChildren.clear();
    }

    void setExiting() {
@@ -200,11 +202,6 @@ class WindowToken extends WindowContainer<WindowState> {
        return null;
    }

    @CallSuper
    void removeWindow(WindowState win) {
        mChildren.remove(win);
    }

    /** Returns true if the token windows list is empty. */
    boolean isEmpty() {
        return mChildren.isEmpty();