Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1d0d826 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Remove split instructions view on split launch success

* We weren't removing the instance of the view
that is created when split initiated from workspace
* Fewer bugs like this once RecentsView + workspace
instructions view are consolidated

Bug: 292590703
Flag: ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE
Test: Swiping to home after split apps launch
hides the view

Change-Id: I6b5037c024e6e0c456b687bc802076f691a955b2
parent d6c00c71
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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();
            }
        });
+5 −0
Original line number Diff line number Diff line
@@ -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)
+1 −0
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@ public class SplitToWorkspaceController {
            private void cleanUp() {
                mLauncher.getDragLayer().removeView(firstFloatingTaskView);
                mLauncher.getDragLayer().removeView(secondFloatingTaskView);
                mController.getSplitAnimationController().removeSplitInstructionsView(mLauncher);
                mController.resetState();
            }
        });
+2 −0
Original line number Diff line number Diff line
@@ -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) {