diff options
| author | 2022-11-22 01:55:06 +0000 | |
|---|---|---|
| committer | 2022-11-22 01:55:06 +0000 | |
| commit | 172f1c303cf30e5faf8dbbbe56d6c2cee64d22b8 (patch) | |
| tree | 4c71098dfad2acdfa0a7f89e010c316196072c81 | |
| parent | 02382b563f9e7163939a5c23c24c77285edbb31f (diff) | |
| parent | 337a2353aee7576b3aa637089852aa405c26bbef (diff) | |
Merge "[RESTRICT AUTOMERGE] Allow activity to be reparent while allowTaskReparenting is applied" into sc-v2-dev
| -rw-r--r-- | services/core/java/com/android/server/wm/ResetTargetTaskHelper.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/ResetTargetTaskHelper.java b/services/core/java/com/android/server/wm/ResetTargetTaskHelper.java index 2626b87b93e5..7e479679e1a2 100644 --- a/services/core/java/com/android/server/wm/ResetTargetTaskHelper.java +++ b/services/core/java/com/android/server/wm/ResetTargetTaskHelper.java @@ -146,15 +146,16 @@ class ResetTargetTaskHelper { return false; } else { - mResultActivities.add(r); if (r.resultTo != null) { // If this activity is sending a reply to a previous activity, we can't do // anything with it now until we reach the start of the reply chain. // NOTE: that we are assuming the result is always to the previous activity, // which is almost always the case but we really shouldn't count on. + mResultActivities.add(r); return false; } else if (mTargetTaskFound && allowTaskReparenting && mTargetTask.affinity != null && mTargetTask.affinity.equals(r.taskAffinity)) { + mResultActivities.add(r); // This activity has an affinity for our task. Either remove it if we are // clearing or move it over to our task. Note that we currently punt on the case // where we are resetting a task that is not at the top but who has activities |