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

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

Merge "Handle onFlingFinished onRecentsAnimationStart" into udc-qpr-dev

parents 3ce99d1d ad2279a2
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);
+6 −6
Original line number Diff line number Diff line
@@ -252,6 +252,10 @@ public class AllSetActivity extends Activity {
        binder.setSwipeUpProxy(isResumed() ? this::createSwipeUpProxy : null);
        binder.setOverviewTargetChangeListener(binder::preloadOverviewForSUWAllSet);
        binder.preloadOverviewForSUWAllSet();
        TaskbarManager taskbarManager = binder.getTaskbarManager();
        if (taskbarManager != null) {
            mLauncherStartAnim = taskbarManager.createLauncherStartFromSuwAnim(MAX_SWIPE_DURATION);
        }
    }

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

        TaskbarManager taskbarManager = mTISBindHelper.getTaskbarManager();
        if (mLauncherStartAnim == null && taskbarManager != null) {
            mLauncherStartAnim = taskbarManager.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();
    }