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

Commit d6c1df8e authored by Evan Rosky's avatar Evan Rosky
Browse files

Revert^2: Expand minimized split stack on relaunch-attempt

If a relaunch-attempt is made on the app in a minimized
primary-split, just expand it. This way its clear to the user
what happened and is much closer to their intent. Previously,
this was just opening recents; however, that doesn't make sense
for pixel launcher (which remains in minimized-dock even with
recents active) because the actual launched-app is still
not-focusable and partially obscured.

Also, modified the restart-attempt logic to directly check if
divider is minimized rather than homeTaskVisible since that is
semantically what matters.

Bug: 152772854
Test: Open an app into split-screen primary with launcher in
      secondary. Then launch the same app from launcher.
Change-Id: I45b80ee8b8596a2a4e2e9cd91624398beaed20bd
parent 4c907029
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -71,12 +71,13 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation {
        public void onActivityRestartAttempt(ActivityManager.RunningTaskInfo task,
                boolean homeTaskVisible, boolean clearedTask) {
            if (task.configuration.windowConfiguration.getWindowingMode()
                    != WINDOWING_MODE_SPLIT_SCREEN_PRIMARY) {
                    != WINDOWING_MODE_SPLIT_SCREEN_PRIMARY || !mDividerOptional.isPresent()) {
                return;
            }

            if (homeTaskVisible) {
                showRecentApps(false /* triggeredFromAltTab */);
            final Divider divider = mDividerOptional.get();
            if (divider.isMinimized()) {
                divider.onUndockingTask();
            }
        }
    };