Loading services/core/java/com/android/server/wm/ActivityStarter.java +11 −8 Original line number Original line Diff line number Diff line Loading @@ -1909,14 +1909,17 @@ class ActivityStarter { mAddingToTask = true; mAddingToTask = true; } } } else if (mStartActivity.mActivityComponent.equals(targetTask.realActivity)) { } else if (mStartActivity.mActivityComponent.equals(targetTask.realActivity)) { if (targetTask == mInTask) { // In this case we are bringing up an existing activity from a recent task. We // don't need to add a new activity instance on top. } else if (((mLaunchFlags & FLAG_ACTIVITY_SINGLE_TOP) != 0 || LAUNCH_SINGLE_TOP == mLaunchMode) && targetTaskTop.mActivityComponent.equals(mStartActivity.mActivityComponent) && mStartActivity.resultTo == null) { // In this case the top activity on the task is the same as the one being launched, // In this case the top activity on the task is the same as the one being launched, // so we take that as a request to bring the task to the foreground. If the top // so we take that as a request to bring the task to the foreground. If the top // activity in the task is the root activity, deliver this new intent to it if it // activity in the task is the root activity, deliver this new intent to it if it // desires. // desires. if (((mLaunchFlags & FLAG_ACTIVITY_SINGLE_TOP) != 0 || LAUNCH_SINGLE_TOP == mLaunchMode) && targetTaskTop.mActivityComponent.equals( mStartActivity.mActivityComponent) && mStartActivity.resultTo == null) { if (targetTaskTop.isRootOfTask()) { if (targetTaskTop.isRootOfTask()) { targetTaskTop.getTaskRecord().setIntent(mStartActivity); targetTaskTop.getTaskRecord().setIntent(mStartActivity); } } Loading Loading
services/core/java/com/android/server/wm/ActivityStarter.java +11 −8 Original line number Original line Diff line number Diff line Loading @@ -1909,14 +1909,17 @@ class ActivityStarter { mAddingToTask = true; mAddingToTask = true; } } } else if (mStartActivity.mActivityComponent.equals(targetTask.realActivity)) { } else if (mStartActivity.mActivityComponent.equals(targetTask.realActivity)) { if (targetTask == mInTask) { // In this case we are bringing up an existing activity from a recent task. We // don't need to add a new activity instance on top. } else if (((mLaunchFlags & FLAG_ACTIVITY_SINGLE_TOP) != 0 || LAUNCH_SINGLE_TOP == mLaunchMode) && targetTaskTop.mActivityComponent.equals(mStartActivity.mActivityComponent) && mStartActivity.resultTo == null) { // In this case the top activity on the task is the same as the one being launched, // In this case the top activity on the task is the same as the one being launched, // so we take that as a request to bring the task to the foreground. If the top // so we take that as a request to bring the task to the foreground. If the top // activity in the task is the root activity, deliver this new intent to it if it // activity in the task is the root activity, deliver this new intent to it if it // desires. // desires. if (((mLaunchFlags & FLAG_ACTIVITY_SINGLE_TOP) != 0 || LAUNCH_SINGLE_TOP == mLaunchMode) && targetTaskTop.mActivityComponent.equals( mStartActivity.mActivityComponent) && mStartActivity.resultTo == null) { if (targetTaskTop.isRootOfTask()) { if (targetTaskTop.isRootOfTask()) { targetTaskTop.getTaskRecord().setIntent(mStartActivity); targetTaskTop.getTaskRecord().setIntent(mStartActivity); } } Loading