Skip to content

Commit fee88fd

Browse files
Dianne Hackbornandroid code review
authored andcommitted
Merge "Issue: Foreground activity performs [Resume] and [Pause] when any process died in sleep mode."
2 parents 50b5370 + dbad287 commit fee88fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

100644100755
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,10 @@ final boolean resumeTopActivityLocked(ActivityRecord prev) {
13141314
// If we are sleeping, and there is no resumed activity, and the top
13151315
// activity is paused, well that is the state we want.
13161316
if ((mService.mSleeping || mService.mShuttingDown)
1317-
&& mLastPausedActivity == next && next.state == ActivityState.PAUSED) {
1317+
&& mLastPausedActivity == next
1318+
&& (next.state == ActivityState.PAUSED
1319+
|| next.state == ActivityState.STOPPED
1320+
|| next.state == ActivityState.STOPPING)) {
13181321
// Make sure we have executed any pending transitions, since there
13191322
// should be nothing left to do at this point.
13201323
mService.mWindowManager.executeAppTransition();

0 commit comments

Comments
 (0)