OSDN Git Service

Put next task on top of stack if top is finishing.
authorCraig Mautner <cmautner@google.com>
Mon, 16 Sep 2013 20:05:41 +0000 (13:05 -0700)
committerCraig Mautner <cmautner@google.com>
Mon, 16 Sep 2013 20:05:41 +0000 (13:05 -0700)
commit7dd9fdfca096f914a090c9fde91e7a4d3407d08a
tree35314763725cd4928bd8c142814795b5d28523ae
parenta751d97e8611d16a2929c538f634a4b4c7b2938a
Put next task on top of stack if top is finishing.

In the case where the top task is finishing and another task is
launching make sure that the next task will be launched once the
top task actually completes pausing.

In the case of b/10550460 the top task, Dialtacts, was finishing
but had not yet completed pausing. It was configured to return to
the home screen (mLaunchHomeTaskNext true) but because its finishing
flag was set all the tests we have thought that the InCallActivity
task was the top task. When it finally did complete the
mLaunchHomeTaskNext flag caused the home activity to be started
instead of the InCallActivity.

If the InCallActivity task had been moved above the Dialtacts task
at the time it was judged to be the top task the home activity
would not have been launched when Dialtacts completed. This fix
moves the judged top task over the finishing top task.

Fixes bug 10550460.

Change-Id: I14052ad2282008679b560dd7fb16b216664ec24d
services/java/com/android/server/am/ActivityStackSupervisor.java