Destroy app-less surfaces when becoming invisible with no animation.

Otherwise there is no later point to destroy them and they linger
around indefinitely. tryStartExitingAnimation seems like a safe point
as we only call this from relayout and the client renderer is paused
at this point, as long as we ensure we don't return a surface (which we won't
since we have laid out to invisible) we should be assured that the client
will not try again to render.

Bug: 77911541
Test: Manual. Docked divider window is destroyed when dismissed.
Change-Id: I2ed37f460a7f258083ab1c196c4e5f7a35e3d557
This commit is contained in:
Robert Carr
2018-04-19 12:26:21 -07:00
parent a194a6bee3
commit d86fd3e7ac

View File

@@ -2204,7 +2204,7 @@ public class WindowManagerService extends IWindowManager.Stub
if (mInputMethodWindow == win) {
setInputMethodWindowLocked(null);
}
boolean stopped = win.mAppToken != null ? win.mAppToken.mAppStopped : false;
boolean stopped = win.mAppToken != null ? win.mAppToken.mAppStopped : true;
// We set mDestroying=true so AppWindowToken#notifyAppStopped in-to destroy surfaces
// will later actually destroy the surface if we do not do so here. Normally we leave
// this to the exit animation.