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

Commit 956b5f70 authored by Alex Chau's avatar Alex Chau
Browse files

Use gridProgress from RecentsView when launching apps from overview

Test: Launch from overview into app, animation should be smooth
Bug: 174464863
Fixes: 182168668
Change-Id: I274ec55aaef1c30c973b8c37de3c6ddae43ff90f
parent ea39d160
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ public final class TaskViewUtils {
        boolean parallaxCenterAndAdjacentTask =
                taskIndex != recentsView.getCurrentPage() && !(dp.isTablet
                        && FeatureFlags.ENABLE_OVERVIEW_GRID.get());
        float gridProgress = recentsView.getGridProgress();
        float gridTranslationSecondary = recentsView.getGridTranslationSecondary(taskIndex);
        int startScroll = recentsView.getScrollOffset(taskIndex);

@@ -197,7 +198,7 @@ public final class TaskViewUtils {
            tsv.setPreview(targets.apps[targets.apps.length - 1]);
            tsv.fullScreenProgress.value = 0;
            tsv.recentsViewScale.value = 1;
            tsv.gridProgress.value = 1;
            tsv.gridProgress.value = gridProgress;
            tsv.gridTranslationSecondary.value = gridTranslationSecondary;
            tsv.setScroll(startScroll);

+9 −0
Original line number Diff line number Diff line
@@ -2773,6 +2773,15 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
                taskView.getGridTranslationY());
    }

    /**
     * Returns the progress of forming a grid from carousel.
     *
     * @return A float from 0 to 1 where 0 is a carousel and 1 is a 2 row grid.
     */
    public float getGridProgress() {
        return mGridProgress;
    }

    public Consumer<MotionEvent> getEventDispatcher(float navbarRotation) {
        float degreesRotated;
        if (navbarRotation == 0) {