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

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

Merge "Deliver intent to activity when FLAG_ACTIIVTY_NEW_DOCUMENT is specified."

parents 11b8f8a0 15a0299e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1023,6 +1023,7 @@ class ActivityStarter {
            // as the first operation, in case the activity will be resumed as a result of later
            // operations.
            if ((mLaunchFlags & FLAG_ACTIVITY_CLEAR_TOP) != 0
                    || isDocumentLaunchesIntoExisting(mLaunchFlags)
                    || mLaunchSingleInstance || mLaunchSingleTask) {
                // In this situation we want to remove all activities from the task up to the one
                // being started. In most cases this means we are resetting the task to its initial
@@ -2039,4 +2040,9 @@ class ActivityStarter {
            }
        }
    }

    static boolean isDocumentLaunchesIntoExisting(int flags) {
        return (flags & Intent.FLAG_ACTIVITY_NEW_DOCUMENT) != 0 &&
                (flags & Intent.FLAG_ACTIVITY_MULTIPLE_TASK) == 0;
    }
}
+2 −1
Original line number Diff line number Diff line
@@ -909,7 +909,8 @@ final class TaskRecord {
                // expecting onNewIntent()), then we will finish the current
                // instance of the activity so a new fresh one can be started.
                if (ret.launchMode == ActivityInfo.LAUNCH_MULTIPLE
                        && (launchFlags & Intent.FLAG_ACTIVITY_SINGLE_TOP) == 0) {
                        && (launchFlags & Intent.FLAG_ACTIVITY_SINGLE_TOP) == 0
                        && !ActivityStarter.isDocumentLaunchesIntoExisting(launchFlags)) {
                    if (!ret.finishing) {
                        if (stack != null) {
                            stack.finishActivityLocked(