Loading services/core/java/com/android/server/am/ActivityStack.java +1 −11 Original line number Diff line number Diff line Loading @@ -1356,17 +1356,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai if (DEBUG_USER_LEAVING) Slog.v(TAG_USER_LEAVING, "Sleep => pause with userLeaving=false"); // If we are in the middle of resuming the top activity in // {@link #resumeTopActivityUncheckedLocked}, mResumedActivity will be set but not // resumed yet. We must not proceed pausing the activity here. This method will be // called again if necessary as part of {@link #checkReadyForSleep} or // {@link ActivityStackSupervisor#checkReadyForSleepLocked}. if (mStackSupervisor.inResumeTopActivity) { if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "In the middle of resuming top activity " + mResumedActivity); } else { startPausingLocked(false, true, null, false); } shouldSleep = false ; } else if (mPausingActivity != null) { // Still waiting for something to pause; can't sleep yet. Loading services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java +0 −18 Original line number Diff line number Diff line Loading @@ -97,24 +97,6 @@ public class ActivityStackTests extends ActivityTestsBase { assertNotNull(mTask.getWindowContainerController()); } @Test public void testNoPauseDuringResumeTopActivity() throws Exception { final ActivityRecord r = new ActivityBuilder(mService).setTask(mTask).build(); // Simulate the a resumed activity set during // {@link ActivityStack#resumeTopActivityUncheckedLocked}. mSupervisor.inResumeTopActivity = true; r.setState(RESUMED, "testNoPauseDuringResumeTopActivity"); final boolean waiting = mStack.goToSleepIfPossible(false); // Ensure we report not being ready for sleep. assertFalse(waiting); // Make sure the resumed activity is untouched. assertEquals(mStack.getResumedActivity(), r); } @Test public void testResumedActivity() throws Exception { final ActivityRecord r = new ActivityBuilder(mService).setTask(mTask).build(); Loading Loading
services/core/java/com/android/server/am/ActivityStack.java +1 −11 Original line number Diff line number Diff line Loading @@ -1356,17 +1356,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai if (DEBUG_USER_LEAVING) Slog.v(TAG_USER_LEAVING, "Sleep => pause with userLeaving=false"); // If we are in the middle of resuming the top activity in // {@link #resumeTopActivityUncheckedLocked}, mResumedActivity will be set but not // resumed yet. We must not proceed pausing the activity here. This method will be // called again if necessary as part of {@link #checkReadyForSleep} or // {@link ActivityStackSupervisor#checkReadyForSleepLocked}. if (mStackSupervisor.inResumeTopActivity) { if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "In the middle of resuming top activity " + mResumedActivity); } else { startPausingLocked(false, true, null, false); } shouldSleep = false ; } else if (mPausingActivity != null) { // Still waiting for something to pause; can't sleep yet. Loading
services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java +0 −18 Original line number Diff line number Diff line Loading @@ -97,24 +97,6 @@ public class ActivityStackTests extends ActivityTestsBase { assertNotNull(mTask.getWindowContainerController()); } @Test public void testNoPauseDuringResumeTopActivity() throws Exception { final ActivityRecord r = new ActivityBuilder(mService).setTask(mTask).build(); // Simulate the a resumed activity set during // {@link ActivityStack#resumeTopActivityUncheckedLocked}. mSupervisor.inResumeTopActivity = true; r.setState(RESUMED, "testNoPauseDuringResumeTopActivity"); final boolean waiting = mStack.goToSleepIfPossible(false); // Ensure we report not being ready for sleep. assertFalse(waiting); // Make sure the resumed activity is untouched. assertEquals(mStack.getResumedActivity(), r); } @Test public void testResumedActivity() throws Exception { final ActivityRecord r = new ActivityBuilder(mService).setTask(mTask).build(); Loading