Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb63c835 authored by Jeff Chang's avatar Jeff Chang Committed by Presubmit Automerger Backend
Browse files

[automerge] [RESTRICT AUTOMERGE] Allow activity to be reparent while...

[automerge] [RESTRICT AUTOMERGE] Allow activity to be reparent while allowTaskReparenting is applied 2p: 7af50c4d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19949706

Bug: 240663194
Change-Id: I5815772b680167b5bde3fa3853ddb8b599bf7e05
parents e929052d 7af50c4d
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -146,15 +146,16 @@ class ResetTargetTaskHelper {
            return false;
            return false;


        } else {
        } else {
            mResultActivities.add(r);
            if (r.resultTo != null) {
            if (r.resultTo != null) {
                // If this activity is sending a reply to a previous activity, we can't do
                // 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.
                // 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,
                // 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.
                // which is almost always the case but we really shouldn't count on.
                mResultActivities.add(r);
                return false;
                return false;
            } else if (mTargetTaskFound && allowTaskReparenting && mTargetTask.affinity != null
            } else if (mTargetTaskFound && allowTaskReparenting && mTargetTask.affinity != null
                    && mTargetTask.affinity.equals(r.taskAffinity)) {
                    && mTargetTask.affinity.equals(r.taskAffinity)) {
                mResultActivities.add(r);
                // This activity has an affinity for our task. Either remove it if we are
                // 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
                // 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
                // where we are resetting a task that is not at the top but who has activities