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

Commit da4ba96e authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Display home activity behind pinned activity that should return home

If we are pinning an activity whose task should return home, then move
the home stack forward so that the home activity is visible behind it
instead of the next task in the fullscreen stack.

Bug: 26697763
Change-Id: Iadb7f5453d4351bc4200bcc2feed0ab9fe41e530
parent d969cc68
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2389,6 +2389,11 @@ public final class ActivityStackSupervisor implements DisplayListener {
            if (task.mActivities.size() == 1) {
                // There is only one activity in the task. So, we can just move the task over to
                // the stack without re-parenting the activity in a different task.
                if (task.getTaskToReturnTo() == HOME_ACTIVITY_TYPE) {
                    // Move the home stack forward if the task we just moved to the pinned stack
                    // was launched from home so home should be visible behind it.
                    moveHomeStackToFront(reason);
                }
                moveTaskToStackLocked(
                        task.taskId, PINNED_STACK_ID, ON_TOP, FORCE_FOCUS, reason, !ANIMATE);
            } else {