Merge "Revert "Revert "Use new onStartSplitLegacy when starting split f..."" into tm-dev am: 38ebd4b41c am: f8b78b481a

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17944715

Change-Id: I38db34a5405f1b45d583d9f6c20472d1b19a9b14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Vinit Nayak
2022-05-03 20:26:23 +00:00
committed by Automerger Merge Worker
3 changed files with 17 additions and 8 deletions
@@ -104,8 +104,7 @@ public class RecentsAnimationCallbacks implements
.map(RemoteAnimationTargetCompat::unwrap) .map(RemoteAnimationTargetCompat::unwrap)
.toArray(RemoteAnimationTarget[]::new); .toArray(RemoteAnimationTarget[]::new);
RemoteAnimationTarget[] nonAppTargets = RemoteAnimationTarget[] nonAppTargets = mSystemUiProxy.onGoingToRecentsLegacy(nonHomeApps);
mSystemUiProxy.onGoingToRecentsLegacy(mCancelled, nonHomeApps);
RecentsAnimationTargets targets = new RecentsAnimationTargets(appTargets, RecentsAnimationTargets targets = new RecentsAnimationTargets(appTargets,
wallpaperTargets, RemoteAnimationTargetCompat.wrap(nonAppTargets), wallpaperTargets, RemoteAnimationTargetCompat.wrap(nonAppTargets),
@@ -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 * Call this when going to recents so that shell can set-up and provide appropriate leashes
* for animation (eg. DividerBar). * 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. * @return RemoteAnimationTargets of windows that need to animate but only exist in shell.
*/ */
public RemoteAnimationTarget[] onGoingToRecentsLegacy(boolean cancel, public RemoteAnimationTarget[] onGoingToRecentsLegacy(RemoteAnimationTarget[] apps) {
RemoteAnimationTarget[] apps) {
if (mSplitScreen != null) { if (mSplitScreen != null) {
try { try {
return mSplitScreen.onGoingToRecentsLegacy(cancel, apps); return mSplitScreen.onGoingToRecentsLegacy(apps);
} catch (RemoteException e) { } catch (RemoteException e) {
Log.w(TAG, "Failed call onGoingToRecentsLegacy"); Log.w(TAG, "Failed call onGoingToRecentsLegacy");
} }
@@ -691,6 +689,17 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI
return null; 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 // One handed
// //
@@ -177,8 +177,9 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn
((RecentsActivity) activityInterface.getCreatedActivity()).startHome(); ((RecentsActivity) activityInterface.getCreatedActivity()).startHome();
return; 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() if (ENABLE_QUICKSTEP_LIVE_TILE.get() && activityInterface.isInLiveTileMode()
&& activityInterface.getCreatedActivity() != null) { && activityInterface.getCreatedActivity() != null) {