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

Commit 5db25d57 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Align live tile with the current task view in Overview when the users swipes up to dismiss

Test: manual
Bug: 160911104
Change-Id: I64b6e737cb11a9bea25b59762431d1023d2153ac
parent 0e649985
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
package com.android.launcher3.uioverrides.touchcontrollers;

import static com.android.launcher3.AbstractFloatingView.TYPE_ACCESSIBLE;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_BOTH;
import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_NEGATIVE;
import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_POSITIVE;
@@ -262,13 +261,6 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
        mCurrentAnimation.setPlayFraction(Utilities.boundToRange(
                totalDisplacement * mProgressMultiplier, 0, 1));

        if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
            if (mRecentsView.getCurrentPage() == 0) {
                mRecentsView.getLiveTileTaskViewSimulator().setOffsetY(
                        isGoingUp ? totalDisplacement : 0);
                mRecentsView.redrawLiveTile();
            }
        }
        return true;
    }

@@ -299,13 +291,6 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
        }

        mCurrentAnimation.setEndAction(() -> onCurrentAnimationEnd(goingToEnd, logAction));
        if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
            mCurrentAnimation.getAnimationPlayer().addUpdateListener(valueAnimator -> {
                if (mRecentsView.getCurrentPage() != 0 || mCurrentAnimationIsGoingUp) {
                    mRecentsView.redrawLiveTile();
                }
            });
        }
        mCurrentAnimation.startWithVelocity(mActivity, goingToEnd,
                velocity, mEndDisplacement, animationDuration);
    }
+7 −0
Original line number Diff line number Diff line
@@ -1475,6 +1475,13 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
            anim.addOnFrameCallback(this::updateCurveProperties);
        }

        if (ENABLE_QUICKSTEP_LIVE_TILE.get() && getRunningTaskView() == taskView) {
            anim.addOnFrameCallback(() -> {
                mLiveTileTaskViewSimulator.setOffsetY(taskView.getTranslationY());
                redrawLiveTile();
            });
        }

        // Add a tiny bit of translation Z, so that it draws on top of other views
        if (animateTaskView) {
            taskView.setTranslationZ(0.1f);