Fix frontOfTask assignment.

If all activities of a given stack were finishing, no activity was
marked as front-of-task. This confused ActivityManager, so make sure
there's always exactly one activity marked as front-of-task.

Change-Id: I087cbe10280d4a60aa5ccfaefe24a223523fb3f2
This commit is contained in:
Danny Baumann
2014-06-22 16:55:36 +02:00
parent d24f557798
commit ec4e780e5c

View File

@@ -173,6 +173,11 @@ final class TaskRecord extends ThumbnailHolder {
foundFront = true;
}
}
if (!foundFront && numActivities > 0) {
// All activities of this task are finishing. As we ought to have a frontOfTask
// activity, make the bottom activity front.
mActivities.get(0).frontOfTask = true;
}
}
/**