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

Commit add17009 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Converting some anonymous classes to lambda calls" into ub-launcher3-master

parents d01ee6d6 4c9ee635
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -226,12 +226,9 @@ public class HotseatPredictionController implements DragController.DragListener,
            }
        }
        if (animate) {
            animationSet.addListener(new AnimationSuccessListener() {
                @Override
                public void onAnimationSuccess(Animator animator) {
                    if (callback != null) callback.run();
            if (callback != null) {
                animationSet.addListener(AnimationSuccessListener.forRunnable(callback));
            }
            });
            animationSet.start();
        } else {
            if (callback != null) callback.run();
+2 −6
Original line number Diff line number Diff line
@@ -220,12 +220,8 @@ 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(new AnimationSuccessListener() {
                @Override
                public void onAnimationSuccess(Animator animator) {
                    onSwipeInteractionCompleted(mStartState);
                }
            });
            anim.addListener(AnimationSuccessListener.forRunnable(
                    () -> onSwipeInteractionCompleted(mStartState)));
            anim.setDuration(80).start();
        }
    }
+2 −7
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import static com.android.launcher3.Utilities.EDGE_NAV_BAR;
import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL;
import static com.android.launcher3.util.VibratorWrapper.OVERVIEW_HAPTIC;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
import android.graphics.PointF;
@@ -177,12 +176,8 @@ public class NoButtonNavbarToOverviewTouchController extends FlingAndHoldTouchCo
                AnimatorSet anim = stateManager.createAtomicAnimation(
                        stateManager.getState(), NORMAL, builder,
                        ATOMIC_OVERVIEW_PEEK_COMPONENT, duration);
                anim.addListener(new AnimationSuccessListener() {
                    @Override
                    public void onAnimationSuccess(Animator animator) {
                        onSwipeInteractionCompleted(NORMAL, Touch.SWIPE);
                    }
                });
                anim.addListener(AnimationSuccessListener.forRunnable(
                        () -> onSwipeInteractionCompleted(NORMAL, Touch.SWIPE)));
                anim.start();
            }
        } else {
+6 −9
Original line number Diff line number Diff line
@@ -960,15 +960,12 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
        }

        AnimatorSet pa = setRecentsChangedOrientation(true);
        pa.addListener(new AnimationSuccessListener() {
            @Override
            public void onAnimationSuccess(Animator animator) {
        pa.addListener(AnimationSuccessListener.forRunnable(() -> {
            updateLayoutRotation(newRotation);
            ((DragLayer) mActivity.getDragLayer()).recreateControllers();
            rotateAllChildTasks();
            setRecentsChangedOrientation(false).start();
            }
        });
        }));
        pa.start();
    }

+2 −6
Original line number Diff line number Diff line
@@ -244,12 +244,8 @@ public class LauncherStateManager {
            } else if (!mConfig.userControlled && animated && mConfig.mTargetState == state) {
                // We are running the same animation as requested
                if (onCompleteRunnable != null) {
                    mConfig.mCurrentAnimation.addListener(new AnimationSuccessListener() {
                        @Override
                        public void onAnimationSuccess(Animator animator) {
                            onCompleteRunnable.run();
                        }
                    });
                    mConfig.mCurrentAnimation.addListener(
                            AnimationSuccessListener.forRunnable(onCompleteRunnable));
                }
                return;
            }
Loading