OSDN Git Service

Recompute focus stack if cleared while starting an activity.
authorWale Ogunwale <ogunwale@google.com>
Tue, 17 Mar 2015 18:36:24 +0000 (11:36 -0700)
committerFilip Gruszczynski <gruszczy@google.com>
Tue, 9 Jun 2015 15:21:17 +0000 (15:21 +0000)
commit0b3d573e46b8be0f0cf170802214320859c94905
tree26bec2f1ad8d1be6f83cb0737b784d84f9e1b541
parentaaf1811dda607f10ab0f0ae80fd2b2b7cf9d0069
Recompute focus stack if cleared while starting an activity.

When starting an activity with Intent.FLAG_ACTIVITY_CLEAR_TOP flag,
the activity is destoried which can also cause its task to be removed
from its current stack if the activity process record is null. We now
recompute the stack for the activity task when this occurs so we
don't NPE later on.

Bug: 19552874

Change-Id: I50f51ca6dc32d4642f78d59cae93b0774bc6cdb7
(cherry picked from commit 86920fe630911cbbc0839b341dc694c2b905ef9e)
services/core/java/com/android/server/am/ActivityStackSupervisor.java