OSDN Git Service

DO NOT MERGE Fix race condition between binder deaths
authorCraig Mautner <cmautner@google.com>
Thu, 14 Aug 2014 23:08:26 +0000 (16:08 -0700)
committerKevin Ma <kma@google.com>
Fri, 26 Sep 2014 01:01:42 +0000 (01:01 +0000)
commit8828d86e79424fc1c7b7d1f908e3450879d5cea0
tree1fe64a92b5bdfc3e562f29f4476a2551cdc3d4c9
parenta6e2f22666db39df527cf6698abc2420c208f02c
DO NOT MERGE Fix race condition between binder deaths

If a Binder dies there is a race between activity manager and window
manager to see who can handle the binderDied call first. If the
activity manager wins the race it will remove the activity and task
but leave the windows around. Until the WindowState.binderDied call
is made and all animation is complete the windows will try to access
the task that they were associated with.

This fix removes the windows of an activity when the activity is
removed. It also defers removal of the activity and task until
exiting windows have completed their animation.

Fixes bug 17031518.

Change-Id: Idf52f55c5feb0cad4e3664ef2eae5b7e95bbf490
(cherry picked from commit 5acd163b828d5b26408eb3a7904d750a1570239e)
services/core/java/com/android/server/wm/AppWindowToken.java
services/core/java/com/android/server/wm/TaskStack.java
services/core/java/com/android/server/wm/WindowManagerService.java