Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +14 −7 Original line number Original line Diff line number Diff line Loading @@ -1944,15 +1944,22 @@ public final class ActivityStackSupervisor implements DisplayListener { r, top.task); r, top.task); top.deliverNewIntentLocked(callingUid, r.intent, r.launchedFromPackage); top.deliverNewIntentLocked(callingUid, r.intent, r.launchedFromPackage); } else { } else { // A special case: we need to // A special case: we need to start the activity because it is not // start the activity because it is not currently // currently running, and the caller has asked to clear the current // running, and the caller has asked to clear the // task to have this activity at the top. // current task to have this activity at the top. addingToTask = true; addingToTask = true; // Now pretend like this activity is being started // Now pretend like this activity is being started by the top of its // by the top of its task, so it is put in the // task, so it is put in the right place. // right place. sourceRecord = intentActivity; sourceRecord = intentActivity; TaskRecord task = sourceRecord.task; if (task != null && task.stack == null) { // Target stack got cleared when we all activities were removed // above. Go ahead and reset it. targetStack = computeStackFocus(sourceRecord, false /* newTask */); targetStack.addTask( task, !launchTaskBehind /* toTop */, false /* moving */); } } } } else if (r.realActivity.equals(intentActivity.task.realActivity)) { } else if (r.realActivity.equals(intentActivity.task.realActivity)) { // In this case the top activity on the task is the // In this case the top activity on the task is the Loading Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +14 −7 Original line number Original line Diff line number Diff line Loading @@ -1944,15 +1944,22 @@ public final class ActivityStackSupervisor implements DisplayListener { r, top.task); r, top.task); top.deliverNewIntentLocked(callingUid, r.intent, r.launchedFromPackage); top.deliverNewIntentLocked(callingUid, r.intent, r.launchedFromPackage); } else { } else { // A special case: we need to // A special case: we need to start the activity because it is not // start the activity because it is not currently // currently running, and the caller has asked to clear the current // running, and the caller has asked to clear the // task to have this activity at the top. // current task to have this activity at the top. addingToTask = true; addingToTask = true; // Now pretend like this activity is being started // Now pretend like this activity is being started by the top of its // by the top of its task, so it is put in the // task, so it is put in the right place. // right place. sourceRecord = intentActivity; sourceRecord = intentActivity; TaskRecord task = sourceRecord.task; if (task != null && task.stack == null) { // Target stack got cleared when we all activities were removed // above. Go ahead and reset it. targetStack = computeStackFocus(sourceRecord, false /* newTask */); targetStack.addTask( task, !launchTaskBehind /* toTop */, false /* moving */); } } } } else if (r.realActivity.equals(intentActivity.task.realActivity)) { } else if (r.realActivity.equals(intentActivity.task.realActivity)) { // In this case the top activity on the task is the // In this case the top activity on the task is the Loading