OSDN Git Service

Clear last paused activity.
authorCraig Mautner <cmautner@google.com>
Mon, 5 Aug 2013 23:14:22 +0000 (16:14 -0700)
committerCraig Mautner <cmautner@google.com>
Mon, 5 Aug 2013 23:14:22 +0000 (16:14 -0700)
Moving an activity to the back used to move it behind the launcher.
This meant that the test in resumeTopActivityLocked() for
mLastPausedActivity being equal to the top activity would fail after
moveTaskToBack(). In the new activity stack model the launcher is
on a different stack so if there is only one task then the test
now passes. Clearing mLastPausedActivity when moving an activity
forward now passes the test.

Fixes bug 10022212.

Change-Id: I17932d5c87d2483f13c29ae85a7067202a08f34e

services/java/com/android/server/am/ActivityStack.java

index dd71044..cc1be98 100644 (file)
@@ -2949,6 +2949,7 @@ final class ActivityStack {
 
         mWindowManager.moveTaskToTop(tr.taskId);
 
+        mLastPausedActivity = null;
         mStackSupervisor.resumeTopActivitiesLocked();
         EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, tr.userId, tr.taskId);