am fee88fdb: Merge "Issue: Foreground activity performs [Resume] and [Pause] when any process died in sleep mode."

* commit 'fee88fdb64cd6c0a51b11426e28a1484390d473b':
  Issue: Foreground activity performs [Resume] and [Pause] when any process died in sleep mode.
This commit is contained in:
Dianne Hackborn
2012-04-21 00:55:26 -07:00
committed by Android Git Automerger

5
services/java/com/android/server/am/ActivityStack.java Normal file → Executable file
View File

@@ -1314,7 +1314,10 @@ final class ActivityStack {
// If we are sleeping, and there is no resumed activity, and the top
// activity is paused, well that is the state we want.
if ((mService.mSleeping || mService.mShuttingDown)
&& mLastPausedActivity == next && next.state == ActivityState.PAUSED) {
&& mLastPausedActivity == next
&& (next.state == ActivityState.PAUSED
|| next.state == ActivityState.STOPPED
|| next.state == ActivityState.STOPPING)) {
// Make sure we have executed any pending transitions, since there
// should be nothing left to do at this point.
mService.mWindowManager.executeAppTransition();