From 8f640757c6d9babc6cc331a0af6ba685ad12babd Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Tue, 16 Feb 2016 14:12:00 -0800 Subject: [PATCH] Fix issue with activity reuse for aliased components. In this case of activity aliases, the ActivityRecord intent member will contain the aliased component name. The TaskRecord intent member will contain the resolved component name. When considering an activity for reuse during start, we need to compare our candidates ActivityRecord intent, not it's TaskRecord intent as we have not yet resolved the alias. Bug: 27112965 Change-Id: Ie3a1fb7b306469037372a0328364ca3d4530599e --- services/core/java/com/android/server/am/ActivityStarter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java index 28be456628ae8..e3a62d5888c9c 100644 --- a/services/core/java/com/android/server/am/ActivityStarter.java +++ b/services/core/java/com/android/server/am/ActivityStarter.java @@ -1362,7 +1362,7 @@ class ActivityStarter { } intentActivity.deliverNewIntentLocked(mCallingUid, mStartActivity.intent, mStartActivity.launchedFromPackage); - } else if (!mStartActivity.intent.filterEquals(intentActivity.task.intent)) { + } else if (!mStartActivity.intent.filterEquals(intentActivity.intent)) { // In this case we are launching the root activity of the task, but with a // different intent. We should start a new instance on top. mAddingToTask = true;