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

Commit 03d0a3ae authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Merge "Handle trampoline activites in different tasks" into nyc-dev

am: 0d35765c

* commit '0d35765c':
  Handle trampoline activites in different tasks

Change-Id: I0f930e67f9cf179d7b819df9969979b12be0b929
parents c37fb8aa 0d35765c
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -558,7 +558,16 @@ class ActivityStarter {
            startedActivityStackId = mTargetStack.mStackId;
        }

        if (startedActivityStackId == DOCKED_STACK_ID && prevFocusedStackId == HOME_STACK_ID) {
        // If we launched the activity from a no display activity that was launched from the home
        // screen, we also need to start recents to un-minimize the docked stack, since the
        // noDisplay activity will be finished shortly after.
        // TODO: We should prevent noDisplay activities from affecting task/stack ordering and
        // visibility instead of using this flag.
        final boolean noDisplayActivityOverHome = mSourceRecord != null
                && mSourceRecord.noDisplay
                && mSourceRecord.task.getTaskToReturnTo() == HOME_ACTIVITY_TYPE;
        if (startedActivityStackId == DOCKED_STACK_ID
                && (prevFocusedStackId == HOME_STACK_ID || noDisplayActivityOverHome)) {
            final ActivityStack homeStack = mSupervisor.getStack(HOME_STACK_ID);
            final ActivityRecord topActivityHomeStack = homeStack != null
                    ? homeStack.topRunningActivityLocked() : null;