From d6c1df8e0218b883286b05a073fd4cfee1734472 Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Tue, 14 Apr 2020 16:43:30 +0000 Subject: [PATCH] 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 --- .../android/systemui/recents/OverviewProxyRecentsImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java index 5bf44c6a3003f..8051998e25304 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java @@ -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(); } } };