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

Commit e6e9a701 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

am: 03d0a3ae

* commit '03d0a3ae':
  Handle trampoline activites in different tasks

Change-Id: I5ed39794c95de8fa36388cb9080a5727837c9ee2
parents 173e2e6b 03d0a3ae
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;