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

Commit 3d1e78a4 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias Committed by Android (Google) Code Review
Browse files

Merge "Handle onFlingFinished onRecentsAnimationStart" into udc-dev

parents 23cab2ae 1b2c2e69
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -103,7 +103,8 @@ public class ProgressDelegateInputConsumer implements InputConsumer,
        mStateCallback = new MultiStateCallback(STATE_NAMES);
        mStateCallback.runOnceAtState(STATE_TARGET_RECEIVED | STATE_HANDLER_INVALIDATED,
                this::endRemoteAnimation);
        mStateCallback.runOnceAtState(STATE_FLING_FINISHED, this::onFlingFinished);
        mStateCallback.runOnceAtState(STATE_TARGET_RECEIVED | STATE_FLING_FINISHED,
                this::onFlingFinished);

        mSwipeDetector = new SingleAxisSwipeDetector(mContext, this, VERTICAL);
        mSwipeDetector.setDetectableScrollConditions(DIRECTION_POSITIVE, false);
+5 −5
Original line number Diff line number Diff line
@@ -254,6 +254,9 @@ public class AllSetActivity extends Activity {
        mBinder.setSwipeUpProxy(isResumed() ? this::createSwipeUpProxy : null);
        mBinder.setOverviewTargetChangeListener(mBinder::preloadOverviewForSUWAllSet);
        mBinder.preloadOverviewForSUWAllSet();
        if (mTaskbarManager != null) {
            mLauncherStartAnim = mTaskbarManager.createLauncherStartFromSuwAnim(MAX_SWIPE_DURATION);
        }
    }

    @Override
@@ -328,12 +331,9 @@ public class AllSetActivity extends Activity {
        mRootView.setAlpha(alpha);
        mRootView.setTranslationY((alpha - 1) * mSwipeUpShift);

        if (mLauncherStartAnim == null && mTaskbarManager != null) {
            mLauncherStartAnim = mTaskbarManager.createLauncherStartFromSuwAnim(MAX_SWIPE_DURATION);
        }
        if (mLauncherStartAnim != null) {
            mLauncherStartAnim.setPlayFraction(Utilities.mapBoundToRange(
                    mSwipeProgress.value, 0, 1, 0, 1, FAST_OUT_SLOW_IN));
            mLauncherStartAnim.setPlayFraction(
                    FAST_OUT_SLOW_IN.getInterpolation(mSwipeProgress.value));
        }
        maybeResumeOrPauseBackgroundAnimation();
    }