mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Removing separate Cancel and End callbacks and using AnimationListener instead
This removes the additional step of invoking these callbacks separately Change-Id: I0b60047a44f179ba725f15b1e791e336884869c9
This commit is contained in:
@@ -17,6 +17,8 @@ package com.android.launcher3.uioverrides.touchcontrollers;
|
||||
|
||||
import static com.android.launcher3.AbstractFloatingView.TYPE_ALL;
|
||||
import static com.android.launcher3.AbstractFloatingView.TYPE_ALL_APPS_EDU;
|
||||
import static com.android.launcher3.LauncherAnimUtils.SUCCESS_TRANSITION_PROGRESS;
|
||||
import static com.android.launcher3.LauncherAnimUtils.newCancelListener;
|
||||
import static com.android.launcher3.LauncherState.ALL_APPS;
|
||||
import static com.android.launcher3.LauncherState.NORMAL;
|
||||
import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PROGRESS;
|
||||
@@ -24,7 +26,6 @@ import static com.android.launcher3.anim.Interpolators.DEACCEL_3;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_ALL_APPS_EDU;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOME_GESTURE;
|
||||
import static com.android.launcher3.touch.AbstractStateChangeTouchController.SUCCESS_TRANSITION_PROGRESS;
|
||||
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
@@ -186,8 +187,8 @@ public class NavBarToHomeTouchController implements TouchController,
|
||||
if (topView != null) {
|
||||
topView.addHintCloseAnim(mPullbackDistance, PULLBACK_INTERPOLATOR, builder);
|
||||
}
|
||||
mCurrentAnimation = builder.createPlaybackController()
|
||||
.setOnCancelRunnable(this::clearState);
|
||||
mCurrentAnimation = builder.createPlaybackController();
|
||||
mCurrentAnimation.getTarget().addListener(newCancelListener(this::clearState));
|
||||
}
|
||||
|
||||
private void clearState() {
|
||||
|
||||
Reference in New Issue
Block a user