OSDN Git Service

Revert "Recompute focus stack if cleared while starting an activity."
authorFilip Gruszczynski <gruszczy@google.com>
Tue, 9 Jun 2015 15:55:30 +0000 (15:55 +0000)
committerFilip Gruszczynski <gruszczy@google.com>
Tue, 9 Jun 2015 15:55:30 +0000 (15:55 +0000)
This reverts commit 0b3d573e46b8be0f0cf170802214320859c94905.

Unfortunately, we need more than just that.

Change-Id: I42ac79cb396812b91cec67ba681144592c0e2e01

services/core/java/com/android/server/am/ActivityStackSupervisor.java

index 8d1140d..0630cad 100644 (file)
@@ -1939,22 +1939,15 @@ public final class ActivityStackSupervisor implements DisplayListener {
                                     r, top.task);
                             top.deliverNewIntentLocked(callingUid, r.intent, r.launchedFromPackage);
                         } else {
-                            // A special case: we need to start the activity because it is not
-                            // currently running, and the caller has asked to clear the current
-                            // task to have this activity at the top.
+                            // A special case: we need to
+                            // start the activity because it is not currently
+                            // running, and the caller has asked to clear the
+                            // current task to have this activity at the top.
                             addingToTask = true;
-                            // Now pretend like this activity is being started by the top of its
-                            // task, so it is put in the right place.
+                            // Now pretend like this activity is being started
+                            // by the top of its task, so it is put in the
+                            // right place.
                             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)) {
                         // In this case the top activity on the task is the