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

Commit 72470f01 authored by Jeff Chang's avatar Jeff Chang
Browse files

Make documentLaunchMode="never" activity don’t create task

Activity that specify “documentLaunchMode="never" should not launched
into a new document even if the Intent contains
FLAG_ACTIVITY_NEW_DOCUMENT.

This CL overrides the behavior of the FLAG_ACTIVITY_NEW_DOCUMENT and
FLAG_ACTIVITY_MULTIPLE_TASK flags to make the definition consistent
with documentation.

Bug: 113840793
Test: atest IntentTests
Change-Id: I9b96e7fe0306d54b8f833873bcad8e0508dd3aa8
parent 02073550
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2691,7 +2691,8 @@ class ActivityStarter {
                    launchFlags |= Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
                    break;
                case ActivityInfo.DOCUMENT_LAUNCH_NEVER:
                    launchFlags &= ~FLAG_ACTIVITY_MULTIPLE_TASK;
                    launchFlags &=
                            ~(Intent.FLAG_ACTIVITY_NEW_DOCUMENT | FLAG_ACTIVITY_MULTIPLE_TASK);
                    break;
            }
        }