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

Commit 065f9db9 authored by Chris Tate's avatar Chris Tate Committed by android-build-merger
Browse files

Merge "Merge "Back up / restore the \'mono audio\' setting" into nyc-dev am:...

Merge "Merge "Back up / restore the \'mono audio\' setting" into nyc-dev am: a3aaa5ee am: d33151bf" into nyc-mr1-dev-plus-aosp
am: 97e9d8e9

* commit '97e9d8e9':
  Put launch adjacent activity in a new task if the activity does exist

Change-Id: I8f00b7d34c6441aebe8d7d488b79c888d4c47e52
parents c33d1055 97e9d8e9
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -1396,11 +1396,18 @@ class ActivityStarter {
            final TaskRecord task = mSupervisor.anyTaskForIdLocked(mOptions.getLaunchTaskId());
            intentActivity = task != null ? task.getTopActivity() : null;
        } else if (putIntoExistingTask) {
            // See if there is a task to bring to the front.  If this is a SINGLE_INSTANCE
            // activity, there can be one and only one instance of it in the history, and it is
            // always in its own unique task, so we do a special search.
            intentActivity = mLaunchSingleInstance ? mSupervisor.findActivityLocked(mIntent, mStartActivity.info)
                    : mSupervisor.findTaskLocked(mStartActivity);
            if (mLaunchSingleInstance) {
                // There can be one and only one instance of single instance activity in the
                // history, and it is always in its own unique task, so we do a special search.
               intentActivity = mSupervisor.findActivityLocked(mIntent, mStartActivity.info);
            } else if ((mLaunchFlags & FLAG_ACTIVITY_LAUNCH_ADJACENT) != 0) {
                // For the launch adjacent case we only want to put the activity in an existing
                // task if the activity already exists in the history.
                intentActivity = mSupervisor.findActivityLocked(mIntent, mStartActivity.info);
            } else {
                // Otherwise find the best task to put the activity in.
                intentActivity = mSupervisor.findTaskLocked(mStartActivity);
            }
        }
        return intentActivity;
    }