Ensure non app WindowTokens are removed when closing.

Non app WindowTokens weren't propery removed when closing. This
would cause several layers to stay around in the system.

Bug: 69852584
Test: Turn phone screen off and back on again. Window is removed.
Change-Id: I51674ebdab129b462e958c3027a26ee6feeffb9f
This commit is contained in:
chaviw
2017-12-04 18:39:34 -08:00
parent e5d74ccc30
commit aec55ff58c

View File

@@ -125,6 +125,11 @@ class WindowToken extends WindowContainer<WindowState> {
}
void setExiting() {
if (mChildren.size() == 0) {
super.removeImmediately();
return;
}
// This token is exiting, so allow it to be removed when it no longer contains any windows.
mPersistOnEmpty = false;