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

Commit 6d630527 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixing return type check when expanding via menu."

parents 220c4155 c85d9ced
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -2177,6 +2177,9 @@ public class ActivityStackSupervisor extends ConfigurationContainer
                // display because it no longer contains any tasks.
                // display because it no longer contains any tasks.
                mAllowDockedStackResize = false;
                mAllowDockedStackResize = false;
            }
            }
            final ActivityStack fullscreenStack = getStack(FULLSCREEN_WORKSPACE_STACK_ID);
            final boolean isFullscreenStackVisible = fullscreenStack != null &&
                    fullscreenStack.getStackVisibilityLocked(null) == STACK_VISIBLE;
            final ArrayList<TaskRecord> tasks = stack.getAllTasks();
            final ArrayList<TaskRecord> tasks = stack.getAllTasks();
            final int size = tasks.size();
            final int size = tasks.size();
            if (onTop) {
            if (onTop) {
@@ -2186,9 +2189,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer
                        // Update the return-to to reflect where the pinned stack task was moved
                        // Update the return-to to reflect where the pinned stack task was moved
                        // from so that we retain the stack that was previously visible if the
                        // from so that we retain the stack that was previously visible if the
                        // pinned stack is recreated. See moveActivityToPinnedStackLocked().
                        // pinned stack is recreated. See moveActivityToPinnedStackLocked().
                        final int focusedStackId = getFocusedStack().getStackId();
                        task.setTaskToReturnTo(isFullscreenStackVisible && onTop ?
                        task.setTaskToReturnTo(focusedStackId == HOME_STACK_ID || !onTop
                                APPLICATION_ACTIVITY_TYPE : HOME_ACTIVITY_TYPE);
                                ? HOME_ACTIVITY_TYPE : APPLICATION_ACTIVITY_TYPE);
                    }
                    }
                    moveTaskToStackLocked(tasks.get(i).taskId,
                    moveTaskToStackLocked(tasks.get(i).taskId,
                            FULLSCREEN_WORKSPACE_STACK_ID, onTop, onTop /*forceFocus*/,
                            FULLSCREEN_WORKSPACE_STACK_ID, onTop, onTop /*forceFocus*/,