Loading services/core/java/com/android/server/am/ActivityStarter.java +6 −0 Original line number Diff line number Diff line Loading @@ -1023,6 +1023,7 @@ class ActivityStarter { // as the first operation, in case the activity will be resumed as a result of later // operations. if ((mLaunchFlags & FLAG_ACTIVITY_CLEAR_TOP) != 0 || isDocumentLaunchesIntoExisting(mLaunchFlags) || mLaunchSingleInstance || mLaunchSingleTask) { // In this situation we want to remove all activities from the task up to the one // being started. In most cases this means we are resetting the task to its initial Loading Loading @@ -2039,4 +2040,9 @@ class ActivityStarter { } } } static boolean isDocumentLaunchesIntoExisting(int flags) { return (flags & Intent.FLAG_ACTIVITY_NEW_DOCUMENT) != 0 && (flags & Intent.FLAG_ACTIVITY_MULTIPLE_TASK) == 0; } } services/core/java/com/android/server/am/TaskRecord.java +2 −1 Original line number Diff line number Diff line Loading @@ -909,7 +909,8 @@ final class TaskRecord { // expecting onNewIntent()), then we will finish the current // instance of the activity so a new fresh one can be started. if (ret.launchMode == ActivityInfo.LAUNCH_MULTIPLE && (launchFlags & Intent.FLAG_ACTIVITY_SINGLE_TOP) == 0) { && (launchFlags & Intent.FLAG_ACTIVITY_SINGLE_TOP) == 0 && !ActivityStarter.isDocumentLaunchesIntoExisting(launchFlags)) { if (!ret.finishing) { if (stack != null) { stack.finishActivityLocked( Loading Loading
services/core/java/com/android/server/am/ActivityStarter.java +6 −0 Original line number Diff line number Diff line Loading @@ -1023,6 +1023,7 @@ class ActivityStarter { // as the first operation, in case the activity will be resumed as a result of later // operations. if ((mLaunchFlags & FLAG_ACTIVITY_CLEAR_TOP) != 0 || isDocumentLaunchesIntoExisting(mLaunchFlags) || mLaunchSingleInstance || mLaunchSingleTask) { // In this situation we want to remove all activities from the task up to the one // being started. In most cases this means we are resetting the task to its initial Loading Loading @@ -2039,4 +2040,9 @@ class ActivityStarter { } } } static boolean isDocumentLaunchesIntoExisting(int flags) { return (flags & Intent.FLAG_ACTIVITY_NEW_DOCUMENT) != 0 && (flags & Intent.FLAG_ACTIVITY_MULTIPLE_TASK) == 0; } }
services/core/java/com/android/server/am/TaskRecord.java +2 −1 Original line number Diff line number Diff line Loading @@ -909,7 +909,8 @@ final class TaskRecord { // expecting onNewIntent()), then we will finish the current // instance of the activity so a new fresh one can be started. if (ret.launchMode == ActivityInfo.LAUNCH_MULTIPLE && (launchFlags & Intent.FLAG_ACTIVITY_SINGLE_TOP) == 0) { && (launchFlags & Intent.FLAG_ACTIVITY_SINGLE_TOP) == 0 && !ActivityStarter.isDocumentLaunchesIntoExisting(launchFlags)) { if (!ret.finishing) { if (stack != null) { stack.finishActivityLocked( Loading