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

Commit 9e6b8d67 authored by Alex Chau's avatar Alex Chau
Browse files

Only show ActionsView when GestureEndTarget is RECENTS

- Also, only animate ActionsView out if it's visible

Fixes: 186507807
Test: Restart launcher, swipe up from home, ActionsView is not shown
Change-Id: I7a83b39cea5176efd40552e3a2dd2257d9e2db4c
parent e19a8e53
Loading
Loading
Loading
Loading
+4 −21
Original line number Diff line number Diff line
@@ -1677,7 +1677,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
        setRunningTaskHidden(false);
        animateUpRunningTaskIconScale();

        if (!showAsGrid() || getFocusedTaskView() != null) {
        if (mCurrentGestureEndTarget == GestureState.GestureEndTarget.RECENTS
                && (!showAsGrid() || getFocusedTaskView() != null)) {
            animateActionsViewIn();
        }

@@ -2001,25 +2002,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
        }
        AnimatorSet gridTranslationAnimatorSet = new AnimatorSet();
        gridTranslationAnimatorSet.playTogether(gridTranslationAnimators);
        gridTranslationAnimatorSet.addListener(new AnimatorListenerAdapter() {
            @Override
            // Allow the actions view to display again once in focus mode
            public void onAnimationEnd(Animator animation) {
                super.onAnimationEnd(animation);
                if (getFocusedTaskView() == null) {
                    mActionsView.getScrollAlpha().setValue(1);
                }
            }

            @Override
            // Hide the actions view if not in focus mode
            public void onAnimationStart(Animator animation) {
                super.onAnimationStart(animation);
                if (getFocusedTaskView() == null) {
                    mActionsView.getScrollAlpha().setValue(0);
                }
            }
        });
        gridTranslationAnimatorSet.start();

        // Use the accumulated translation of the row containing the last task.
@@ -2322,7 +2304,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
                        snapToPageImmediately(pageToSnapTo);
                        // Grid got messed up, reapply.
                        updateGridProperties(taskView, draggedIndex - mTaskViewStartIndex);
                        if (showAsGrid() && getFocusedTaskView() == null) {
                        if (showAsGrid() && getFocusedTaskView() == null
                                && mActionsView.getVisibilityAlpha().getValue() == 1) {
                            animateActionsViewOut();
                        }
                    }