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

Commit a254cd7e authored by Craig Mautner's avatar Craig Mautner
Browse files

Update launchFlags after changing Intent flags

If you don't you're going to have a bad time. In particular we
did not act on the new flags and the documentLaunchMode setting
was ignored.

Fixes bug 15245852.

Change-Id: Ie1c435c4a821b9fc787e5e06e7b24aa98a242225
parent 49a6e1b3
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();