From 4a7e51c3c289833e6afeaf63ee081b6605d15f24 Mon Sep 17 00:00:00 2001 From: Jeff Chang Date: Thu, 25 Feb 2021 17:24:53 +0800 Subject: [PATCH] Set documentLaunchMode to alias activity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The alias activity doesn't have the documentLaunchMode information. So, an new activity instance was created while starting the alias activity of a documentLaunchMode “intoExisting” activity even with the same Uri. This CL updates the documentLaunchMode from target activity to alias activity. Bug: 128526493 Test: atest ActivityStarterTests 1. Launch an intoExisting activity with data uri 2. Launch an alisa activity with data uri. 3 Check if launch the existing activity Change-Id: I256e1db99363bd5950ebe01aeec2d37c7eba4722 --- .../android/content/pm/parsing/component/ParsedActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/content/pm/parsing/component/ParsedActivity.java b/core/java/android/content/pm/parsing/component/ParsedActivity.java index 2ea24f71371b2..6f478accedd77 100644 --- a/core/java/android/content/pm/parsing/component/ParsedActivity.java +++ b/core/java/android/content/pm/parsing/component/ParsedActivity.java @@ -155,6 +155,7 @@ public class ParsedActivity extends ParsedMainComponent { alias.nonLocalizedLabel = target.nonLocalizedLabel; alias.launchMode = target.launchMode; alias.lockTaskLaunchMode = target.lockTaskLaunchMode; + alias.documentLaunchMode = target.documentLaunchMode; alias.descriptionRes = target.descriptionRes; alias.screenOrientation = target.screenOrientation; alias.taskAffinity = target.taskAffinity; @@ -179,7 +180,6 @@ public class ParsedActivity extends ParsedMainComponent { // alias.exported = target.exported; // alias.permission = target.permission; // alias.splitName = target.splitName; -// alias.documentLaunchMode = target.documentLaunchMode; // alias.persistableMode = target.persistableMode; // alias.rotationAnimation = target.rotationAnimation; // alias.colorMode = target.colorMode;