Loading quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +4 −5 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.launcher3.hybridhotseat; import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback; import static com.android.launcher3.hybridhotseat.HotseatEduController.getSettingsIntent; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOTSEAT_PREDICTION_PINNED; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOTSEAT_RANKED; Loading Loading @@ -151,7 +150,7 @@ public class HotseatPredictionController implements DragController.DragListener, * Shows appropriate hotseat education based on prediction enabled and migration states. */ public void showEdu() { mLauncher.getStateManager().goToState(NORMAL, true, forSuccessCallback(() -> { mLauncher.getStateManager().goToState(NORMAL, true, () -> { if (mPredictedItems.isEmpty()) { // launcher has empty predictions set Snackbar.show(mLauncher, R.string.hotsaet_tip_prediction_disabled, Loading @@ -166,7 +165,7 @@ public class HotseatPredictionController implements DragController.DragListener, .collect(Collectors.toList())); eduController.showEdu(); } })); }); } /** Loading Loading @@ -256,8 +255,8 @@ public class HotseatPredictionController implements DragController.DragListener, } } if (animate) { animationSet.addListener( forSuccessCallback(this::removeOutlineDrawings)); animationSet.addListener(AnimationSuccessListener .forRunnable(this::removeOutlineDrawings)); animationSet.start(); } else { removeOutlineDrawings(); Loading quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java +2 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import androidx.annotation.NonNull; import com.android.launcher3.BaseQuickstepLauncher; import com.android.launcher3.LauncherState; import com.android.launcher3.anim.AnimatorListeners; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.anim.PropertySetter; import com.android.launcher3.states.StateAnimationConfig; Loading Loading @@ -78,7 +78,7 @@ public final class RecentsViewStateController extends mRecentsView.updateEmptyMessage(); } else { builder.addListener( AnimatorListeners.forSuccessCallback(mRecentsView::resetTaskVisuals)); AnimationSuccessListener.forRunnable(mRecentsView::resetTaskVisuals)); } // Create or dismiss split screen select animations Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java +3 −4 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ 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; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; 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.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOME_GESTURE; Loading @@ -39,7 +38,7 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.anim.AnimatorListeners; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.anim.PendingAnimation; Loading Loading @@ -200,7 +199,7 @@ public class NavBarToHomeTouchController implements TouchController, .animateWithVelocity(velocity); } else { mLauncher.getStateManager().goToState(mEndState, true, forEndCallback(() -> onSwipeInteractionCompleted(mEndState))); () -> onSwipeInteractionCompleted(mEndState)); } if (mStartState != mEndState) { logHomeGesture(); Loading @@ -215,7 +214,7 @@ public class NavBarToHomeTouchController implements TouchController, // Quickly return to the state we came from (we didn't move far). ValueAnimator anim = mCurrentAnimation.getAnimationPlayer(); anim.setFloatValues(progress, 0); anim.addListener(AnimatorListeners.forSuccessCallback( anim.addListener(AnimationSuccessListener.forRunnable( () -> onSwipeInteractionCompleted(mStartState))); anim.setDuration(80).start(); } Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java +2 −3 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import static com.android.launcher3.LauncherState.HINT_STATE; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.Utilities.EDGE_NAV_BAR; import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback; import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL; import static com.android.launcher3.util.VibratorWrapper.OVERVIEW_HAPTIC; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED; Loading Loading @@ -173,13 +172,13 @@ public class NoButtonNavbarToOverviewTouchController extends PortraitStatesTouch } mNormalToHintOverviewScrimAnimator = null; mCurrentAnimation.getTarget().addListener(newCancelListener(() -> mLauncher.getStateManager().goToState(OVERVIEW, true, forSuccessCallback(() -> { mLauncher.getStateManager().goToState(OVERVIEW, true, () -> { mOverviewResistYAnim = AnimatorControllerWithResistance .createRecentsResistanceFromOverviewAnim(mLauncher, null) .createPlaybackController(); mReachedOverview = true; maybeSwipeInteractionToOverviewComplete(); })))); }))); mCurrentAnimation.getTarget().removeListener(mClearStateOnCancelListener); mCurrentAnimation.dispatchOnCancel(); Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +1 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.OVERVIEW_ACTIONS; import static com.android.launcher3.LauncherState.QUICK_SWITCH; import static com.android.launcher3.anim.AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; import static com.android.launcher3.anim.Interpolators.ACCEL_0_75; import static com.android.launcher3.anim.Interpolators.DEACCEL_3; import static com.android.launcher3.anim.Interpolators.LINEAR; Loading Loading @@ -419,7 +418,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, targetState.ordinal > mStartState.ordinal ? LAUNCHER_UNKNOWN_SWIPEUP : LAUNCHER_UNKNOWN_SWIPEDOWN)); mLauncher.getStateManager().goToState(targetState, false, forEndCallback(this::clearState)); mLauncher.getStateManager().goToState(targetState, false, this::clearState); } private void cancelAnimations() { Loading Loading
quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +4 −5 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.launcher3.hybridhotseat; import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback; import static com.android.launcher3.hybridhotseat.HotseatEduController.getSettingsIntent; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOTSEAT_PREDICTION_PINNED; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOTSEAT_RANKED; Loading Loading @@ -151,7 +150,7 @@ public class HotseatPredictionController implements DragController.DragListener, * Shows appropriate hotseat education based on prediction enabled and migration states. */ public void showEdu() { mLauncher.getStateManager().goToState(NORMAL, true, forSuccessCallback(() -> { mLauncher.getStateManager().goToState(NORMAL, true, () -> { if (mPredictedItems.isEmpty()) { // launcher has empty predictions set Snackbar.show(mLauncher, R.string.hotsaet_tip_prediction_disabled, Loading @@ -166,7 +165,7 @@ public class HotseatPredictionController implements DragController.DragListener, .collect(Collectors.toList())); eduController.showEdu(); } })); }); } /** Loading Loading @@ -256,8 +255,8 @@ public class HotseatPredictionController implements DragController.DragListener, } } if (animate) { animationSet.addListener( forSuccessCallback(this::removeOutlineDrawings)); animationSet.addListener(AnimationSuccessListener .forRunnable(this::removeOutlineDrawings)); animationSet.start(); } else { removeOutlineDrawings(); Loading
quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java +2 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import androidx.annotation.NonNull; import com.android.launcher3.BaseQuickstepLauncher; import com.android.launcher3.LauncherState; import com.android.launcher3.anim.AnimatorListeners; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.anim.PropertySetter; import com.android.launcher3.states.StateAnimationConfig; Loading Loading @@ -78,7 +78,7 @@ public final class RecentsViewStateController extends mRecentsView.updateEmptyMessage(); } else { builder.addListener( AnimatorListeners.forSuccessCallback(mRecentsView::resetTaskVisuals)); AnimationSuccessListener.forRunnable(mRecentsView::resetTaskVisuals)); } // Create or dismiss split screen select animations Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java +3 −4 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ 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; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; 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.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOME_GESTURE; Loading @@ -39,7 +38,7 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.anim.AnimatorListeners; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.anim.PendingAnimation; Loading Loading @@ -200,7 +199,7 @@ public class NavBarToHomeTouchController implements TouchController, .animateWithVelocity(velocity); } else { mLauncher.getStateManager().goToState(mEndState, true, forEndCallback(() -> onSwipeInteractionCompleted(mEndState))); () -> onSwipeInteractionCompleted(mEndState)); } if (mStartState != mEndState) { logHomeGesture(); Loading @@ -215,7 +214,7 @@ public class NavBarToHomeTouchController implements TouchController, // Quickly return to the state we came from (we didn't move far). ValueAnimator anim = mCurrentAnimation.getAnimationPlayer(); anim.setFloatValues(progress, 0); anim.addListener(AnimatorListeners.forSuccessCallback( anim.addListener(AnimationSuccessListener.forRunnable( () -> onSwipeInteractionCompleted(mStartState))); anim.setDuration(80).start(); } Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java +2 −3 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import static com.android.launcher3.LauncherState.HINT_STATE; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.Utilities.EDGE_NAV_BAR; import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback; import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL; import static com.android.launcher3.util.VibratorWrapper.OVERVIEW_HAPTIC; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED; Loading Loading @@ -173,13 +172,13 @@ public class NoButtonNavbarToOverviewTouchController extends PortraitStatesTouch } mNormalToHintOverviewScrimAnimator = null; mCurrentAnimation.getTarget().addListener(newCancelListener(() -> mLauncher.getStateManager().goToState(OVERVIEW, true, forSuccessCallback(() -> { mLauncher.getStateManager().goToState(OVERVIEW, true, () -> { mOverviewResistYAnim = AnimatorControllerWithResistance .createRecentsResistanceFromOverviewAnim(mLauncher, null) .createPlaybackController(); mReachedOverview = true; maybeSwipeInteractionToOverviewComplete(); })))); }))); mCurrentAnimation.getTarget().removeListener(mClearStateOnCancelListener); mCurrentAnimation.dispatchOnCancel(); Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +1 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.OVERVIEW_ACTIONS; import static com.android.launcher3.LauncherState.QUICK_SWITCH; import static com.android.launcher3.anim.AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; import static com.android.launcher3.anim.Interpolators.ACCEL_0_75; import static com.android.launcher3.anim.Interpolators.DEACCEL_3; import static com.android.launcher3.anim.Interpolators.LINEAR; Loading Loading @@ -419,7 +418,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, targetState.ordinal > mStartState.ordinal ? LAUNCHER_UNKNOWN_SWIPEUP : LAUNCHER_UNKNOWN_SWIPEDOWN)); mLauncher.getStateManager().goToState(targetState, false, forEndCallback(this::clearState)); mLauncher.getStateManager().goToState(targetState, false, this::clearState); } private void cancelAnimations() { Loading