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

Commit bf1bf9de authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Update launchFlags after changing Intent flags" into lmp-preview-dev

parents 1a7da57f a254cd7e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1473,7 +1473,8 @@ public final class ActivityStackSupervisor implements DisplayListener {
            r.delayedResume = true;
        }

        ActivityRecord notTop = (launchFlags&Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP) != 0 ? r : null;
        ActivityRecord notTop =
                (launchFlags & Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP) != 0 ? r : null;

        // If the onlyIfNeeded flag is set, then we can do this if the activity
        // being launched is the same as the one making the call...  or, as
@@ -1496,9 +1497,11 @@ public final class ActivityStackSupervisor implements DisplayListener {
            case ActivityInfo.DOCUMENT_LAUNCH_ALWAYS:
                intent.addFlags(
                        Intent.FLAG_ACTIVITY_NEW_DOCUMENT | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
                launchFlags = intent.getFlags();
                break;
            case ActivityInfo.DOCUMENT_LAUNCH_INTO_EXISTING:
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
                launchFlags = intent.getFlags();
                break;
        }
        final boolean newDocument = intent.isDocument();