Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4c3a67e authored by Byunghun Jeon's avatar Byunghun Jeon
Browse files

ActivityStack: Put top activity to stopstate when device is turned off

Put top activity to stop state when device is turned off. For blurred
lockscreen, activitystack was putting top activity to pause state.
This was causing activity states to go into valid state.

Change-Id: I58b65b6af63020c6cf8c70dea26396d6bbffc950
CRs-Fixed: 794282
parent 8e6ce499
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -1016,12 +1016,7 @@ final class ActivityStack {
                } else if (!hasVisibleBehindActivity()) {
                    // If we were visible then resumeTopActivities will release resources before
                    // stopping.
                    ActivityRecord top = topRunningActivityLocked(null);
                    if (top != null && top.equals(prev) && mService.isSleepingOrShuttingDown()){
                        Slog.d(TAG, "Top activity keeps the pause sate. top : "+top);
                    } else {
                    mStackSupervisor.mStoppingActivities.add(prev);
                    }
                    if (mStackSupervisor.mStoppingActivities.size() > 3 ||
                            prev.frontOfTask && mTaskHistory.size() <= 1) {
                        // If we already have a few activities waiting to stop,