Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6763058f authored by Wale Ogunwale's avatar Wale Ogunwale Committed by Android Git Automerger
Browse files

am f61bc8a2: Merge "Bring task with root activity to front when launching from...

am f61bc8a2: Merge "Bring task with root activity to front when launching from recents." into lmp-mr1-dev

* commit 'f61bc8a2':
  Bring task with root activity to front when launching from recents.
parents 56db8228 f61bc8a2
Loading
Loading
Loading
Loading
+6 −14
Original line number Diff line number Diff line
@@ -3619,6 +3619,10 @@ public final class ActivityManagerService extends ActivityManagerNative
            if (task == null) {
                throw new IllegalArgumentException("Task " + taskId + " not found.");
            }
            if (task.getRootActivity() != null) {
                moveTaskToFrontLocked(task.taskId, 0, null);
                return ActivityManager.START_TASK_TO_FRONT;
            }
            callingUid = task.mCallingUid;
            callingPackage = task.mCallingPackage;
            intent = task.intent;
@@ -19443,20 +19447,8 @@ public final class ActivityManagerService extends ActivityManagerNative
        @Override
        public void moveToFront() {
            checkCaller();
            final TaskRecord tr;
            synchronized (ActivityManagerService.this) {
                tr = recentTaskForIdLocked(mTaskId);
                if (tr == null) {
                    throw new IllegalArgumentException("Unable to find task ID " + mTaskId);
                }
                if (tr.getRootActivity() != null) {
                    moveTaskToFrontLocked(tr.taskId, 0, null);
                    return;
                }
            }
            startActivityFromRecentsInner(tr.taskId, null);
            // Will bring task to front if it already has a root activity.
            startActivityFromRecentsInner(mTaskId, null);
        }
        @Override