OSDN Git Service

Clean up surfaces when app is resumed without being stopped.
authorChong Zhang <chz@google.com>
Thu, 21 Jul 2016 01:33:56 +0000 (18:33 -0700)
committerChong Zhang <chz@google.com>
Thu, 21 Jul 2016 17:17:39 +0000 (10:17 -0700)
commit45e6d2dc8b8b7bd4e588368179d8d4b05fc6810c
tree8cff45abc4af25df06fb2adb675c166c45c4aa38
parentf8bc27d9683e4089cdfd778dcb61ae67f44665b7
Clean up surfaces when app is resumed without being stopped.

When quickly toggling between two apps, app could be resumed while
it's stopping but not yet stopped. Upon resuming, it could have
surfaces that's marked mDestroying and waiting for the stopped
to be destroyed.

We need to dispose these surfaces properly. If the window is already
removed, we destroy them. Otherwise, clear mDestroying flag so that
the window is ready to be used again. Leaving mDestroying=true makes
the window ineligible for certain things such as receiving wallpaper.

bug: 30255354
Change-Id: Id881653550595ab8e702d6950949bf202ac5a0d9
core/java/android/view/IWindowManager.aidl
services/core/java/com/android/server/am/ActivityStack.java
services/core/java/com/android/server/wm/AppWindowToken.java
services/core/java/com/android/server/wm/WindowManagerService.java
tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java