Merge "Revert "Avoid creating new instance on top when started for resu..."" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e44eb5b955
@@ -1819,7 +1819,7 @@ class ActivityStarter {
|
|||||||
*/
|
*/
|
||||||
private int deliverToCurrentTopIfNeeded(ActivityStack topStack) {
|
private int deliverToCurrentTopIfNeeded(ActivityStack topStack) {
|
||||||
final ActivityRecord top = topStack.topRunningNonDelayedActivityLocked(mNotTop);
|
final ActivityRecord top = topStack.topRunningNonDelayedActivityLocked(mNotTop);
|
||||||
final boolean dontStart = top != null
|
final boolean dontStart = top != null && mStartActivity.resultTo == null
|
||||||
&& top.mActivityComponent.equals(mStartActivity.mActivityComponent)
|
&& top.mActivityComponent.equals(mStartActivity.mActivityComponent)
|
||||||
&& top.mUserId == mStartActivity.mUserId
|
&& top.mUserId == mStartActivity.mUserId
|
||||||
&& top.attachedToProcess()
|
&& top.attachedToProcess()
|
||||||
@@ -2055,6 +2055,8 @@ class ActivityStarter {
|
|||||||
&& !isLaunchModeOneOf(LAUNCH_SINGLE_TASK, LAUNCH_SINGLE_INSTANCE)
|
&& !isLaunchModeOneOf(LAUNCH_SINGLE_TASK, LAUNCH_SINGLE_INSTANCE)
|
||||||
&& (mLaunchFlags & FLAG_ACTIVITY_NEW_DOCUMENT) != 0;
|
&& (mLaunchFlags & FLAG_ACTIVITY_NEW_DOCUMENT) != 0;
|
||||||
|
|
||||||
|
sendNewTaskResultRequestIfNeeded();
|
||||||
|
|
||||||
if ((mLaunchFlags & FLAG_ACTIVITY_NEW_DOCUMENT) != 0 && r.resultTo == null) {
|
if ((mLaunchFlags & FLAG_ACTIVITY_NEW_DOCUMENT) != 0 && r.resultTo == null) {
|
||||||
mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
|
mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
|
||||||
}
|
}
|
||||||
@@ -2236,8 +2238,6 @@ class ActivityStarter {
|
|||||||
mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
|
mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sendNewTaskResultRequestIfNeeded();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void computeSourceStack() {
|
private void computeSourceStack() {
|
||||||
|
|||||||
Reference in New Issue
Block a user