From dd7e132db52c0eaf23d341f50e8f8f7747dd7a81 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Fri, 15 Apr 2022 17:58:38 -0700 Subject: [PATCH] Use new onStartSplitLegacy when starting split from overview Bug: 223396876 Change-Id: I696749f7674a09b2a12c6ef2c2b7d19d0884049a --- .../quickstep/RecentsAnimationCallbacks.java | 3 +-- .../com/android/quickstep/SystemUiProxy.java | 17 +++++++++++++---- .../android/quickstep/TaskAnimationManager.java | 5 +++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java b/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java index fe31f1d8bb..51ae56b96d 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java @@ -104,8 +104,7 @@ public class RecentsAnimationCallbacks implements .map(RemoteAnimationTargetCompat::unwrap) .toArray(RemoteAnimationTarget[]::new); - RemoteAnimationTarget[] nonAppTargets = - mSystemUiProxy.onGoingToRecentsLegacy(mCancelled, nonHomeApps); + RemoteAnimationTarget[] nonAppTargets = mSystemUiProxy.onGoingToRecentsLegacy(nonHomeApps); RecentsAnimationTargets targets = new RecentsAnimationTargets(appTargets, wallpaperTargets, RemoteAnimationTargetCompat.wrap(nonAppTargets), diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index 5ef89d309a..5e12f319ba 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -676,14 +676,12 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI * Call this when going to recents so that shell can set-up and provide appropriate leashes * for animation (eg. DividerBar). * - * @param cancel true if recents starting is being cancelled. * @return RemoteAnimationTargets of windows that need to animate but only exist in shell. */ - public RemoteAnimationTarget[] onGoingToRecentsLegacy(boolean cancel, - RemoteAnimationTarget[] apps) { + public RemoteAnimationTarget[] onGoingToRecentsLegacy(RemoteAnimationTarget[] apps) { if (mSplitScreen != null) { try { - return mSplitScreen.onGoingToRecentsLegacy(cancel, apps); + return mSplitScreen.onGoingToRecentsLegacy(apps); } catch (RemoteException e) { Log.w(TAG, "Failed call onGoingToRecentsLegacy"); } @@ -691,6 +689,17 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI return null; } + public RemoteAnimationTarget[] onStartingSplitLegacy(RemoteAnimationTarget[] apps) { + if (mSplitScreen != null) { + try { + return mSplitScreen.onStartingSplitLegacy(apps); + } catch (RemoteException e) { + Log.w(TAG, "Failed call onStartingSplitLegacy"); + } + } + return null; + } + // // One handed // diff --git a/quickstep/src/com/android/quickstep/TaskAnimationManager.java b/quickstep/src/com/android/quickstep/TaskAnimationManager.java index f094d712a1..2565674763 100644 --- a/quickstep/src/com/android/quickstep/TaskAnimationManager.java +++ b/quickstep/src/com/android/quickstep/TaskAnimationManager.java @@ -177,8 +177,9 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn ((RecentsActivity) activityInterface.getCreatedActivity()).startHome(); return; } - RemoteAnimationTarget[] nonAppTargets = SystemUiProxy.INSTANCE.get(mCtx) - .onGoingToRecentsLegacy(false, nonHomeApps); + + RemoteAnimationTarget[] nonAppTargets = + SystemUiProxy.INSTANCE.getNoCreate().onStartingSplitLegacy(nonHomeApps); if (ENABLE_QUICKSTEP_LIVE_TILE.get() && activityInterface.isInLiveTileMode() && activityInterface.getCreatedActivity() != null) {