Merge "Null out mRemoteTargetHandles when swiping to home" into tm-dev am: aa2f879c55

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

Change-Id: I27e04a6d0fab3aa6b2b5fc17d195f9c9c6c3eafc
This commit is contained in:
Vinit Nayak
2022-03-23 15:11:42 +00:00
committed by Automerger Merge Worker
3 changed files with 3 additions and 1 deletions
@@ -186,6 +186,7 @@ public class FallbackSwipeHandler extends
} else {
recentsCallback = callback;
}
mRecentsView.cleanupRemoteTargets();
mRecentsAnimationController.finish(
mAppCanEnterPip /* toRecents */, recentsCallback, true /* sendUserLeaveHint */);
}
@@ -239,6 +239,7 @@ public class LauncherSwipeHandlerV2 extends
@Override
protected void finishRecentsControllerToHome(Runnable callback) {
mRecentsView.cleanupRemoteTargets();
mRecentsAnimationController.finish(
true /* toRecents */, callback, true /* sendUserLeaveHint */);
}
@@ -4283,7 +4283,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
mPendingAnimation.addEndListener(isSuccess -> {
if (isSuccess) {
if (tv.getTaskIds()[1] != -1) {
if (tv.getTaskIds()[1] != -1 && mRemoteTargetHandles != null) {
// TODO(b/194414938): make this part of the animations instead.
TaskViewUtils.createSplitAuxiliarySurfacesAnimator(
mRemoteTargetHandles[0].getTransformParams().getTargetSet().nonApps,