Do not return stacks to AM that are marked for deferred removal.

When the Activity Manager informs the Window Manager that a stack has
been removed, it can opt to hold onto the stack (such as when an
animation is in progress). This can lead to inconsistencies where the
Window Manager can report a stack back to the Activity Manager that
has since been removed.

This changelist addresses one such call point in
WindowManagerService#setNewDisplayOverrideConfiguration. Deferred
removed displays are now filtered out of the returned list.

Change-Id: I5f7aad9296cec8bd56e933a71553f9cd40579378
Fixes: 71548119
Test: atest FrameworksServicesTests:com.android.server.wm.RootWindowContainerTests
4 files changed