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

Commit df17ab0e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't finish noHistory activity while it is on the topmost."

parents 1cce0c2f 963d1880
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1497,9 +1497,10 @@ class ActivityStarter {
            // anyone interested in this piece of information.
            final Task homeStack = targetTask.getDisplayArea().getRootHomeTask();
            final boolean homeTaskVisible = homeStack != null && homeStack.shouldBeVisible(null);
            final ActivityRecord top = targetTask.getTopNonFinishingActivity();
            final boolean visible = top != null && top.isVisible();
            mService.getTaskChangeNotificationController().notifyActivityRestartAttempt(
                    targetTask.getTaskInfo(), homeTaskVisible, clearedTask,
                    targetTask.getTopNonFinishingActivity().isVisible());
                    targetTask.getTaskInfo(), homeTaskVisible, clearedTask, visible);
        }
    }

+3 −2
Original line number Diff line number Diff line
@@ -6039,8 +6039,9 @@ class Task extends WindowContainer<WindowContainer> {
        // If the most recent activity was noHistory but was only stopped rather
        // than stopped+finished because the device went to sleep, we need to make
        // sure to finish it as we're making a new activity topmost.
        if (shouldSleepActivities() && mLastNoHistoryActivity != null &&
                !mLastNoHistoryActivity.finishing) {
        if (shouldSleepActivities() && mLastNoHistoryActivity != null
                && !mLastNoHistoryActivity.finishing
                && mLastNoHistoryActivity != next) {
            if (DEBUG_STATES) Slog.d(TAG_STATES,
                    "no-history finish of " + mLastNoHistoryActivity + " on new resume");
            mLastNoHistoryActivity.finishIfPossible("resume-no-history", false /* oomAdj */);