diff options
| author | 2014-06-22 16:55:36 +0200 | |
|---|---|---|
| committer | 2014-06-23 08:43:37 +0200 | |
| commit | ec4e780e5c3ffacabe2e41dfbf40636744666859 (patch) | |
| tree | d27b451d7d24ca6905bc0ff16c26e3e85e624d36 | |
| parent | d24f557798d04bdd50f2a45e48b70b009a205b4a (diff) | |
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
| -rw-r--r-- | services/java/com/android/server/am/TaskRecord.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/java/com/android/server/am/TaskRecord.java b/services/java/com/android/server/am/TaskRecord.java index 9105103ac632..9c4b7d14ec26 100644 --- a/services/java/com/android/server/am/TaskRecord.java +++ b/services/java/com/android/server/am/TaskRecord.java @@ -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; + } } /** |