Loading services/core/java/com/android/server/am/ActivityStack.java +0 −12 Original line number Original line Diff line number Diff line Loading @@ -65,7 +65,6 @@ import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NA import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.ASSISTANT_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.ASSISTANT_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE; import static com.android.server.am.ActivityStack.ActivityState.STOPPED; import static com.android.server.am.ActivityStackSupervisor.FindTaskResult; import static com.android.server.am.ActivityStackSupervisor.FindTaskResult; import static com.android.server.am.ActivityStackSupervisor.ON_TOP; import static com.android.server.am.ActivityStackSupervisor.ON_TOP; import static com.android.server.am.ActivityStackSupervisor.PAUSE_IMMEDIATELY; import static com.android.server.am.ActivityStackSupervisor.PAUSE_IMMEDIATELY; Loading Loading @@ -1167,8 +1166,6 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai final ArrayList<ActivityRecord> activities = mTaskHistory.get(taskNdx).mActivities; final ArrayList<ActivityRecord> activities = mTaskHistory.get(taskNdx).mActivities; for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) { for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) { final ActivityRecord r = activities.get(activityNdx); final ActivityRecord r = activities.get(activityNdx); // TODO(b/37244415): This just wrong. We should also be moving PAUSED activities to // the stopped state when we are sleeping. if (r.state == ActivityState.STOPPING || r.state == ActivityState.STOPPED if (r.state == ActivityState.STOPPING || r.state == ActivityState.STOPPED || r.state == ActivityState.PAUSED || r.state == ActivityState.PAUSING) { || r.state == ActivityState.PAUSED || r.state == ActivityState.PAUSING) { r.setSleeping(true); r.setSleeping(true); Loading Loading @@ -1803,15 +1800,6 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Skipping: already visible at " + r); "Skipping: already visible at " + r); if (r.state == STOPPED) { // In this case the activity is visible, but in the stopped state. // This sometimes happens if the activity is behind the lockscreen. // Restart the activity to the paused or resumed state since we want // it to be in the visible state now. makeVisibleAndRestartIfNeeded(starting, configChanges, isTop, resumeNextActivity, r); } if (r.handleAlreadyVisible()) { if (r.handleAlreadyVisible()) { resumeNextActivity = false; resumeNextActivity = false; } } Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +1 −3 Original line number Original line Diff line number Diff line Loading @@ -1477,12 +1477,11 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D stack.minimalResumeActivityLocked(r); stack.minimalResumeActivityLocked(r); } else { } else { // This activity is not starting in the resumed state... which should look like we asked // This activity is not starting in the resumed state... which should look like we asked // it to resume+pause (but remain visible), and it has done so and reported back the // it to pause+stop (but remain visible), and it has done so and reported back the // current icicle and other state. // current icicle and other state. if (DEBUG_STATES) Slog.v(TAG_STATES, if (DEBUG_STATES) Slog.v(TAG_STATES, "Moving to PAUSED: " + r + " (starting in paused state)"); "Moving to PAUSED: " + r + " (starting in paused state)"); r.state = PAUSED; r.state = PAUSED; r.stopped = false; } } // Launch the new version setup screen if needed. We do this -after- // Launch the new version setup screen if needed. We do this -after- Loading Loading @@ -3090,7 +3089,6 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } } } } mGoingToSleepActivities.clear(); mGoingToSleepActivities.clear(); ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); } } void activitySleptLocked(ActivityRecord r) { void activitySleptLocked(ActivityRecord r) { Loading Loading
services/core/java/com/android/server/am/ActivityStack.java +0 −12 Original line number Original line Diff line number Diff line Loading @@ -65,7 +65,6 @@ import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NA import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.ASSISTANT_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.ASSISTANT_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE; import static com.android.server.am.ActivityStack.ActivityState.STOPPED; import static com.android.server.am.ActivityStackSupervisor.FindTaskResult; import static com.android.server.am.ActivityStackSupervisor.FindTaskResult; import static com.android.server.am.ActivityStackSupervisor.ON_TOP; import static com.android.server.am.ActivityStackSupervisor.ON_TOP; import static com.android.server.am.ActivityStackSupervisor.PAUSE_IMMEDIATELY; import static com.android.server.am.ActivityStackSupervisor.PAUSE_IMMEDIATELY; Loading Loading @@ -1167,8 +1166,6 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai final ArrayList<ActivityRecord> activities = mTaskHistory.get(taskNdx).mActivities; final ArrayList<ActivityRecord> activities = mTaskHistory.get(taskNdx).mActivities; for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) { for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) { final ActivityRecord r = activities.get(activityNdx); final ActivityRecord r = activities.get(activityNdx); // TODO(b/37244415): This just wrong. We should also be moving PAUSED activities to // the stopped state when we are sleeping. if (r.state == ActivityState.STOPPING || r.state == ActivityState.STOPPED if (r.state == ActivityState.STOPPING || r.state == ActivityState.STOPPED || r.state == ActivityState.PAUSED || r.state == ActivityState.PAUSING) { || r.state == ActivityState.PAUSED || r.state == ActivityState.PAUSING) { r.setSleeping(true); r.setSleeping(true); Loading Loading @@ -1803,15 +1800,6 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Skipping: already visible at " + r); "Skipping: already visible at " + r); if (r.state == STOPPED) { // In this case the activity is visible, but in the stopped state. // This sometimes happens if the activity is behind the lockscreen. // Restart the activity to the paused or resumed state since we want // it to be in the visible state now. makeVisibleAndRestartIfNeeded(starting, configChanges, isTop, resumeNextActivity, r); } if (r.handleAlreadyVisible()) { if (r.handleAlreadyVisible()) { resumeNextActivity = false; resumeNextActivity = false; } } Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +1 −3 Original line number Original line Diff line number Diff line Loading @@ -1477,12 +1477,11 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D stack.minimalResumeActivityLocked(r); stack.minimalResumeActivityLocked(r); } else { } else { // This activity is not starting in the resumed state... which should look like we asked // This activity is not starting in the resumed state... which should look like we asked // it to resume+pause (but remain visible), and it has done so and reported back the // it to pause+stop (but remain visible), and it has done so and reported back the // current icicle and other state. // current icicle and other state. if (DEBUG_STATES) Slog.v(TAG_STATES, if (DEBUG_STATES) Slog.v(TAG_STATES, "Moving to PAUSED: " + r + " (starting in paused state)"); "Moving to PAUSED: " + r + " (starting in paused state)"); r.state = PAUSED; r.state = PAUSED; r.stopped = false; } } // Launch the new version setup screen if needed. We do this -after- // Launch the new version setup screen if needed. We do this -after- Loading Loading @@ -3090,7 +3089,6 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } } } } mGoingToSleepActivities.clear(); mGoingToSleepActivities.clear(); ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); } } void activitySleptLocked(ActivityRecord r) { void activitySleptLocked(ActivityRecord r) { Loading