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

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

Merge "Fix NPE in WMS"

parents 62084f54 37848f3f
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -193,8 +193,8 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
    }

    DisplayContent getTopFocusedDisplayContent() {
        return getDisplayContent(mTopFocusedDisplayId == INVALID_DISPLAY
                ? DEFAULT_DISPLAY : mTopFocusedDisplayId);
        final DisplayContent dc = getDisplayContent(mTopFocusedDisplayId);
        return dc != null ? dc : getDisplayContent(DEFAULT_DISPLAY);
    }

    @Override
@@ -1045,6 +1045,15 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
        mWmService.scheduleAnimationLocked();
    }

    @Override
    protected void removeChild(DisplayContent dc) {
        super.removeChild(dc);
        if (mTopFocusedDisplayId == dc.getDisplayId()) {
            mWmService.updateFocusedWindowLocked(
                    UPDATE_FOCUS_NORMAL, true /* updateInputWindows */);
        }
    }

    /**
     * For all display at or below this call the callback.
     *