Merge "Revert f714906c for startActivityForResult" into sc-dev
This commit is contained in:
@@ -1816,7 +1816,8 @@ class ActivityStarter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Task computeTargetTask() {
|
private Task computeTargetTask() {
|
||||||
if (mInTask == null && !mAddingToTask && (mLaunchFlags & FLAG_ACTIVITY_NEW_TASK) != 0) {
|
if (mStartActivity.resultTo == null && mInTask == null && !mAddingToTask
|
||||||
|
&& (mLaunchFlags & FLAG_ACTIVITY_NEW_TASK) != 0) {
|
||||||
// A new task should be created instead of using existing one.
|
// A new task should be created instead of using existing one.
|
||||||
return null;
|
return null;
|
||||||
} else if (mSourceRecord != null) {
|
} else if (mSourceRecord != null) {
|
||||||
@@ -2516,9 +2517,7 @@ class ActivityStarter {
|
|||||||
// If bring to front is requested, and no result is requested and we have not been given
|
// If bring to front is requested, and no result is requested and we have not been given
|
||||||
// an explicit task to launch in to, and we can find a task that was started with this
|
// an explicit task to launch in to, and we can find a task that was started with this
|
||||||
// same component, then instead of launching bring that one to the front.
|
// same component, then instead of launching bring that one to the front.
|
||||||
putIntoExistingTask &= !isLaunchModeOneOf(LAUNCH_SINGLE_INSTANCE, LAUNCH_SINGLE_TASK)
|
putIntoExistingTask &= mInTask == null && mStartActivity.resultTo == null;
|
||||||
? (mInTask == null && mStartActivity.resultTo == null)
|
|
||||||
: (mInTask == null);
|
|
||||||
ActivityRecord intentActivity = null;
|
ActivityRecord intentActivity = null;
|
||||||
if (putIntoExistingTask) {
|
if (putIntoExistingTask) {
|
||||||
if (LAUNCH_SINGLE_INSTANCE == mLaunchMode) {
|
if (LAUNCH_SINGLE_INSTANCE == mLaunchMode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user