From 5ff153106d0d2cb49926eb6b370c492fccb8c4eb Mon Sep 17 00:00:00 2001 From: Louis Chang Date: Mon, 29 Mar 2021 09:32:50 +0800 Subject: [PATCH] Do not override MULTIPLE_TASK flag for singleInstancePerTask MULTIPLE_TASK flag was removed when documentLaunchMode set to never, but it shouldn't be removed when launch mode is singleInstancePerTask, or the behavior is actually duplicated as singleTask. Bug: 175354896 Test: atest IntentTests Change-Id: Ib5a94423e4d91f7d93c7fe0fc30e1c91e6616677 --- core/res/res/values/attrs_manifest.xml | 2 +- .../com/android/server/wm/ActivityStarter.java | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml index c51b2d84ab6d2..588ae79cda1df 100644 --- a/core/res/res/values/attrs_manifest.xml +++ b/core/res/res/values/attrs_manifest.xml @@ -826,7 +826,7 @@ that created the task, and therefore there will only be one instance of this activity in a task. In constrast to the {@code singleTask} launch mode, this activity can be started in multiple instances in different tasks if the - {@code FLAG_ACTIVITY_MULTIPLE_TASK} is set.--> + {@code FLAG_ACTIVITY_MULTIPLE_TASK} or {@code FLAG_ACTIVITY_NEW_DOCUMENT} is set.-->