Merge "Remove split instructions view on split launch success" into udc-qpr-dev am: 89976ecae4

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

Change-Id: I6ef257cfd7d977c09d968cc870bfc32ee764ec7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Vinit Nayak
2023-07-31 18:35:49 +00:00
committed by Automerger Merge Worker
4 changed files with 10 additions and 0 deletions
@@ -664,6 +664,8 @@ public class QuickstepLauncher extends Launcher {
@Override
public void onAnimationCancel(Animator animation) {
getDragLayer().removeView(floatingTaskView);
mSplitSelectStateController.getSplitAnimationController()
.removeSplitInstructionsView(QuickstepLauncher.this);
mSplitSelectStateController.resetState();
}
});
@@ -265,6 +265,11 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC
return anim
}
/** Removes the split instructions view from [launcher] drag layer. */
fun removeSplitInstructionsView(launcher: StatefulActivity<*>) {
safeRemoveViewFromDragLayer(launcher, splitInstructionsView)
}
private fun safeRemoveViewFromDragLayer(launcher: StatefulActivity<*>, view: View?) {
if (view != null) {
launcher.dragLayer.removeView(view)
@@ -169,6 +169,7 @@ public class SplitToWorkspaceController {
private void cleanUp() {
mLauncher.getDragLayer().removeView(firstFloatingTaskView);
mLauncher.getDragLayer().removeView(secondFloatingTaskView);
mController.getSplitAnimationController().removeSplitInstructionsView(mLauncher);
mController.resetState();
}
});
@@ -4823,6 +4823,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mSecondFloatingTaskView = null;
mSplitInstructionsView = null;
mSplitSelectSource = null;
mSplitSelectStateController.getSplitAnimationController()
.removeSplitInstructionsView(mActivity);
}
if (mSecondSplitHiddenView != null) {