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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user