Merge "Revert "Send RESULT_CANCELED immediately if start-activity-for-result across TaskFragments"" into tm-qpr-dev am: 6446b23045
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19272610 Change-Id: I13b1ef9d5dd48ed589239d69a2d5839e81e55736 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2565,7 +2565,6 @@ class ActivityStarter {
|
|||||||
mInTask = null;
|
mInTask = null;
|
||||||
}
|
}
|
||||||
mInTaskFragment = inTaskFragment;
|
mInTaskFragment = inTaskFragment;
|
||||||
sendNewTaskFragmentResultRequestIfNeeded();
|
|
||||||
|
|
||||||
mStartFlags = startFlags;
|
mStartFlags = startFlags;
|
||||||
// If the onlyIfNeeded flag is set, then we can do this if the activity being launched
|
// If the onlyIfNeeded flag is set, then we can do this if the activity being launched
|
||||||
@@ -2608,18 +2607,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() {
|
private void computeLaunchingTaskFlags() {
|
||||||
// If the caller is not coming from another activity, but has given us an explicit task into
|
// 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.
|
// which they would like us to launch the new activity, then let's see about doing that.
|
||||||
|
|||||||
Reference in New Issue
Block a user