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

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

Merge "Avoid creating new instance on top when started for result in some cases"

parents 1682f7a8 7d6783c3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1813,7 +1813,7 @@ class ActivityStarter {
     */
    private int deliverToCurrentTopIfNeeded(ActivityStack topStack) {
        final ActivityRecord top = topStack.topRunningNonDelayedActivityLocked(mNotTop);
        final boolean dontStart = top != null && mStartActivity.resultTo == null
        final boolean dontStart = top != null
                && top.mActivityComponent.equals(mStartActivity.mActivityComponent)
                && top.mUserId == mStartActivity.mUserId
                && top.attachedToProcess()
@@ -2049,8 +2049,6 @@ class ActivityStarter {
                && !isLaunchModeOneOf(LAUNCH_SINGLE_TASK, LAUNCH_SINGLE_INSTANCE)
                && (mLaunchFlags & FLAG_ACTIVITY_NEW_DOCUMENT) != 0;

        sendNewTaskResultRequestIfNeeded();

        if ((mLaunchFlags & FLAG_ACTIVITY_NEW_DOCUMENT) != 0 && r.resultTo == null) {
            mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
        }
@@ -2232,6 +2230,8 @@ class ActivityStarter {
                mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
            }
        }

        sendNewTaskResultRequestIfNeeded();
    }

    private void computeSourceStack() {