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

Commit 88451606 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Match live tile with the cut out when swiping down in Overview

Bug: 160911104
Test: manual
Change-Id: Ic2e65b773239e409a1d55781b7393c3b82b10c94
parent 0e649985
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -184,13 +184,21 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
    }

    /**
     * Adds animation for all the components corresponding to transition from an app to overview
     * Adds animation for all the components corresponding to transition from an app to overview.
     */
    public void addAppToOverviewAnim(PendingAnimation pa, TimeInterpolator interpolator) {
        pa.addFloat(fullScreenProgress, AnimatedFloat.VALUE, 1, 0, interpolator);
        pa.addFloat(recentsViewScale, AnimatedFloat.VALUE, getFullScreenScale(), 1, interpolator);
    }

    /**
     * Adds animation for all the components corresponding to transition from overview to the app.
     */
    public void addOverviewToAppAnim(PendingAnimation pa, TimeInterpolator interpolator) {
        pa.addFloat(fullScreenProgress, AnimatedFloat.VALUE, 0, 1, interpolator);
        pa.addFloat(recentsViewScale, AnimatedFloat.VALUE, 1, getFullScreenScale(), interpolator);
    }

    /**
     * Returns the current clipped/visible window bounds in the window coordinate space
     */
+0 −13
Original line number Diff line number Diff line
@@ -135,19 +135,6 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher>
        return anim;
    }

    @Override
    protected void onTaskLaunchAnimationUpdate(float progress, TaskView tv) {
        if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
            if (tv.isRunningTask()) {
                mLiveTileParams.setProgress(1 - progress)
                        .setSyncTransactionApplier(mSyncTransactionApplier);
                // TODO: Revisit live tiles
            } else {
                redrawLiveTile();
            }
        }
    }

    @Override
    protected void onTaskLaunchAnimationEnd(boolean success) {
        if (success) {
+4 −5
Original line number Diff line number Diff line
@@ -1978,8 +1978,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
                            ? targetSysUiFlags
                            : 0);

            onTaskLaunchAnimationUpdate(animator.getAnimatedFraction(), tv);

            // Passing the threshold from taskview to fullscreen app will vibrate
            final boolean passed = animator.getAnimatedFraction() >=
                    SUCCESS_TRANSITION_PROGRESS;
@@ -2003,6 +2001,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView

        mPendingAnimation = new PendingAnimation(duration);
        mPendingAnimation.add(anim);
        if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
            mLiveTileTaskViewSimulator.addOverviewToAppAnim(mPendingAnimation, interpolator);
            mPendingAnimation.addOnFrameCallback(this::redrawLiveTile);
        }
        mPendingAnimation.addEndListener((endState) -> {
            if (endState.isSuccess) {
                Consumer<Boolean> onLaunchResult = (result) -> {
@@ -2028,9 +2030,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
        return mPendingAnimation;
    }

    protected void onTaskLaunchAnimationUpdate(float progress, TaskView tv) {
    }

    protected void onTaskLaunchAnimationEnd(boolean success) {
        if (success) {
            resetTaskVisuals();