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

Commit 7086256a authored by Alex Chau's avatar Alex Chau Committed by Android (Google) Code Review
Browse files

Merge "Use gridProgress from RecentsView when launching apps from overview" into sc-dev

parents fb7b9fd8 956b5f70
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) {