Merge "Only launch an activity in an existing task if activity types match"
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 494ae6c..e083709 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -556,6 +556,10 @@
if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Skipping " + task + ": mismatch root " + r);
continue;
}
+ if (r.mActivityType != target.mActivityType) {
+ if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Skipping " + task + ": mismatch activity type");
+ continue;
+ }
final Intent taskIntent = task.intent;
final Intent affinityIntent = task.affinityIntent;