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

Commit 57faee47 authored by Evan Rosky's avatar Evan Rosky Committed by Automerger Merge Worker
Browse files

Merge "Don't skip resume on transient-launch activity" into udc-qpr-dev am: 5ea204ec

parents 21c02687 5ea204ec
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -1176,7 +1176,7 @@ class TaskFragment extends WindowContainer<WindowContainer> {
    }

    final boolean resumeTopActivity(ActivityRecord prev, ActivityOptions options,
            boolean deferPause) {
            boolean skipPause) {
        ActivityRecord next = topRunningActivity(true /* focusableOnly */);
        if (next == null || !next.canResumeByCompat()) {
            return false;
@@ -1184,11 +1184,9 @@ class TaskFragment extends WindowContainer<WindowContainer> {

        next.delayedResume = false;

        // If we are currently pausing an activity, then don't do anything until that is done.
        final boolean allPausedComplete = mRootWindowContainer.allPausedActivitiesComplete();
        if (!allPausedComplete) {
            ProtoLog.v(WM_DEBUG_STATES,
                    "resumeTopActivity: Skip resume: some activity pausing.");
        if (!skipPause && !mRootWindowContainer.allPausedActivitiesComplete()) {
            // If we aren't skipping pause, then we have to wait for currently pausing activities.
            ProtoLog.v(WM_DEBUG_STATES, "resumeTopActivity: Skip resume: some activity pausing.");
            return false;
        }

@@ -1252,7 +1250,7 @@ class TaskFragment extends WindowContainer<WindowContainer> {
            lastResumed = lastFocusedRootTask.getTopResumedActivity();
        }

        boolean pausing = !deferPause && taskDisplayArea.pauseBackTasks(next);
        boolean pausing = !skipPause && taskDisplayArea.pauseBackTasks(next);
        if (mResumedActivity != null) {
            ProtoLog.d(WM_DEBUG_STATES, "resumeTopActivity: Pausing %s", mResumedActivity);
            pausing |= startPausing(mTaskSupervisor.mUserLeaving, false /* uiSleeping */,