mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Ensures that the swipe up to home animation is ended prior to view recycling.
Bug: 154163960 Change-Id: I70b2c6290a2a17be8b80ba0209528173d6627332
This commit is contained in:
@@ -19,7 +19,6 @@ import static com.android.launcher3.LauncherAnimUtils.DRAWABLE_ALPHA;
|
||||
import static com.android.launcher3.Utilities.getBadge;
|
||||
import static com.android.launcher3.Utilities.getFullDrawable;
|
||||
import static com.android.launcher3.config.FeatureFlags.ADAPTIVE_ICON_WINDOW_ANIM;
|
||||
import static com.android.launcher3.states.RotationHelper.REQUEST_LOCK;
|
||||
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
|
||||
|
||||
import android.animation.Animator;
|
||||
@@ -100,6 +99,7 @@ public class FloatingIconView extends FrameLayout implements
|
||||
|
||||
private AnimatorSet mFadeAnimatorSet;
|
||||
private ListenerView mListenerView;
|
||||
private Runnable mFastFinishRunnable;
|
||||
|
||||
public FloatingIconView(Context context) {
|
||||
this(context, null);
|
||||
@@ -443,9 +443,21 @@ public class FloatingIconView extends FrameLayout implements
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a runnable that is called after a call to {@link #fastFinish()}.
|
||||
*/
|
||||
public void setFastFinishRunnable(Runnable runnable) {
|
||||
mFastFinishRunnable = runnable;
|
||||
}
|
||||
|
||||
public void fastFinish() {
|
||||
if (mFastFinishRunnable != null) {
|
||||
mFastFinishRunnable.run();
|
||||
mFastFinishRunnable = null;
|
||||
}
|
||||
if (mLoadIconSignal != null) {
|
||||
mLoadIconSignal.cancel();
|
||||
mLoadIconSignal = null;
|
||||
}
|
||||
if (mEndRunnable != null) {
|
||||
mEndRunnable.run();
|
||||
@@ -655,6 +667,7 @@ public class FloatingIconView extends FrameLayout implements
|
||||
sTmpObjArray[0] = null;
|
||||
mIconLoadResult = null;
|
||||
mClipIconView.recycle();
|
||||
mFastFinishRunnable = null;
|
||||
}
|
||||
|
||||
private static class IconLoadResult {
|
||||
|
||||
Reference in New Issue
Block a user