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

Commit e248e58f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Consider new_task flag when launching with adjacent" into tm-qpr-dev...

Merge "Consider new_task flag when launching with adjacent" into tm-qpr-dev am: a4b7722d am: d33c2ce4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18707811



Change-Id: I859b92ed95d4d09978c5ae0a35730579b9f5d28d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 84d09fc1 d33c2ce4
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -2501,11 +2501,6 @@ class ActivityStarter {
            }
        }

        if ((mLaunchFlags & FLAG_ACTIVITY_LAUNCH_ADJACENT) != 0 && mSourceRecord == null) {
            // ignore the flag if there is no the sourceRecord
            mLaunchFlags &= ~FLAG_ACTIVITY_LAUNCH_ADJACENT;
        }

        // We'll invoke onUserLeaving before onPause only if the launching
        // activity did not explicitly state that this is an automated launch.
        mSupervisor.mUserLeaving = (mLaunchFlags & FLAG_ACTIVITY_NO_USER_ACTION) == 0;
@@ -2700,6 +2695,12 @@ class ActivityStarter {
                mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
            }
        }

        if ((mLaunchFlags & FLAG_ACTIVITY_LAUNCH_ADJACENT) != 0
                && ((mLaunchFlags & FLAG_ACTIVITY_NEW_TASK) == 0 || mSourceRecord == null)) {
            // ignore the flag if there is no the sourceRecord or without new_task flag
            mLaunchFlags &= ~FLAG_ACTIVITY_LAUNCH_ADJACENT;
        }
    }

    private void computeSourceRootTask() {