From 3ef159becdbda1041781920eb816d041bd88da44 Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Wed, 20 Nov 2019 17:00:06 -0800 Subject: [PATCH] Connect split-screen things to systemui divider Since divider stuff lives in sysui instead of framework Bug: 133381284 Test: Manual, open 2 apps in split and drag-up to show recents. Change-Id: If6740b7ee4829bf4cac6e829e81943f16a41f977 --- .../android/quickstep/RecentsAnimationController.java | 9 +++------ .../src/com/android/quickstep/SystemUiProxy.java | 11 +++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationController.java b/quickstep/src/com/android/quickstep/RecentsAnimationController.java index 46af8bfcd3..d3be0b9c47 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationController.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationController.java @@ -81,12 +81,9 @@ public class RecentsAnimationController { mWindowThresholdCrossed = windowThresholdCrossed; UI_HELPER_EXECUTOR.execute(() -> { mController.setAnimationTargetsBehindSystemBars(!windowThresholdCrossed); - if (mShouldMinimizeSplitScreen && windowThresholdCrossed) { - // NOTE: As a workaround for conflicting animations (Launcher animating the task - // leash, and SystemUI resizing the docked stack, which resizes the task), we - // currently only set the minimized mode, and not the inverse. - // TODO: Synchronize the minimize animation with the launcher animation - mController.setSplitScreenMinimized(windowThresholdCrossed); + SystemUiProxy p = SystemUiProxy.INSTANCE.getNoCreate(); + if (p != null && mShouldMinimizeSplitScreen) { + p.setSplitScreenMinimized(windowThresholdCrossed); } }); } diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index 3c6537a72d..d9cb240c19 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -296,4 +296,15 @@ public class SystemUiProxy implements ISystemUiProxy { } } } + + @Override + public void setSplitScreenMinimized(boolean minimized) { + if (mSystemUiProxy != null) { + try { + mSystemUiProxy.setSplitScreenMinimized(minimized); + } catch (RemoteException e) { + Log.w(TAG, "Failed call stopScreenPinning", e); + } + } + } }