Loading services/core/java/com/android/server/am/ActivityStarter.java +1 −1 Original line number Diff line number Diff line Loading @@ -1416,7 +1416,7 @@ class ActivityStarter { } intentActivity.deliverNewIntentLocked(mCallingUid, mStartActivity.intent, mStartActivity.launchedFromPackage); } else if (!mStartActivity.intent.filterEquals(intentActivity.intent)) { } else if (!intentActivity.task.isSameIntentResolution(mStartActivity)) { // 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; Loading services/core/java/com/android/server/am/TaskRecord.java +13 −0 Original line number Diff line number Diff line Loading @@ -469,6 +469,19 @@ final class TaskRecord { setLockTaskAuth(); } /** * Return true if the input activity has the same intent resolution as the intent this task * record is based on (normally the root activity intent). */ boolean isSameIntentResolution(ActivityRecord r) { final Intent intent = new Intent(r.intent); // Correct the activity intent for aliasing. The task record intent will always be based on // the real activity that will be launched not the alias, so we need to use an intent with // the component name pointing to the real activity not the alias in the activity record. intent.setComponent(r.realActivity); return this.intent.filterEquals(intent); } void setTaskToReturnTo(int taskToReturnTo) { mTaskToReturnTo = (taskToReturnTo == RECENTS_ACTIVITY_TYPE) ? HOME_ACTIVITY_TYPE : taskToReturnTo; Loading Loading
services/core/java/com/android/server/am/ActivityStarter.java +1 −1 Original line number Diff line number Diff line Loading @@ -1416,7 +1416,7 @@ class ActivityStarter { } intentActivity.deliverNewIntentLocked(mCallingUid, mStartActivity.intent, mStartActivity.launchedFromPackage); } else if (!mStartActivity.intent.filterEquals(intentActivity.intent)) { } else if (!intentActivity.task.isSameIntentResolution(mStartActivity)) { // 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; Loading
services/core/java/com/android/server/am/TaskRecord.java +13 −0 Original line number Diff line number Diff line Loading @@ -469,6 +469,19 @@ final class TaskRecord { setLockTaskAuth(); } /** * Return true if the input activity has the same intent resolution as the intent this task * record is based on (normally the root activity intent). */ boolean isSameIntentResolution(ActivityRecord r) { final Intent intent = new Intent(r.intent); // Correct the activity intent for aliasing. The task record intent will always be based on // the real activity that will be launched not the alias, so we need to use an intent with // the component name pointing to the real activity not the alias in the activity record. intent.setComponent(r.realActivity); return this.intent.filterEquals(intent); } void setTaskToReturnTo(int taskToReturnTo) { mTaskToReturnTo = (taskToReturnTo == RECENTS_ACTIVITY_TYPE) ? HOME_ACTIVITY_TYPE : taskToReturnTo; Loading