Revert "Send RESULT_CANCELED immediately if start-activity-for-result across TaskFragments"

This reverts commit 762850ba32.

Reason for revert: b/238714871

Change-Id: I5f23a725940f0291ba5cfab1aa6e361c0e6c6ac5
This commit is contained in:
Louis Chang
2022-07-13 05:50:44 +00:00
parent 762850ba32
commit f3ccee3827

View File

@@ -2576,7 +2576,6 @@ class ActivityStarter {
mInTask = null;
}
mInTaskFragment = inTaskFragment;
sendNewTaskFragmentResultRequestIfNeeded();
mStartFlags = startFlags;
// If the onlyIfNeeded flag is set, then we can do this if the activity being launched
@@ -2619,18 +2618,6 @@ class ActivityStarter {
}
}
private void sendNewTaskFragmentResultRequestIfNeeded() {
if (mStartActivity.resultTo != null && mInTaskFragment != null
&& mInTaskFragment != mStartActivity.resultTo.getTaskFragment()) {
Slog.w(TAG,
"Activity is launching as a new TaskFragment, so cancelling activity result.");
mStartActivity.resultTo.sendResult(INVALID_UID, mStartActivity.resultWho,
mStartActivity.requestCode, RESULT_CANCELED,
null /* data */, null /* dataGrants */);
mStartActivity.resultTo = null;
}
}
private void computeLaunchingTaskFlags() {
// If the caller is not coming from another activity, but has given us an explicit task into
// which they would like us to launch the new activity, then let's see about doing that.