Don't reapply state when setting user controlled animation
Bug: 79525106 Change-Id: Ia41a51559196d4aa657fae47727c7366d9073295
This commit is contained in:
@@ -387,6 +387,7 @@ public class LauncherStateManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setCurrentUserControlledAnimation(AnimatorPlaybackController controller) {
|
public void setCurrentUserControlledAnimation(AnimatorPlaybackController controller) {
|
||||||
|
clearCurrentAnimation();
|
||||||
setCurrentAnimation(controller.getTarget());
|
setCurrentAnimation(controller.getTarget());
|
||||||
mConfig.userControlled = true;
|
mConfig.userControlled = true;
|
||||||
mConfig.playbackController = controller;
|
mConfig.playbackController = controller;
|
||||||
@@ -405,15 +406,10 @@ public class LauncherStateManager {
|
|||||||
}
|
}
|
||||||
if (mConfig.playbackController != null
|
if (mConfig.playbackController != null
|
||||||
&& mConfig.playbackController.getTarget() == childAnim) {
|
&& mConfig.playbackController.getTarget() == childAnim) {
|
||||||
if (mConfig.mCurrentAnimation != null) {
|
clearCurrentAnimation();
|
||||||
mConfig.mCurrentAnimation.removeListener(mConfig);
|
|
||||||
mConfig.mCurrentAnimation = null;
|
|
||||||
}
|
|
||||||
mConfig.playbackController = null;
|
|
||||||
break;
|
break;
|
||||||
} else if (mConfig.mCurrentAnimation == childAnim) {
|
} else if (mConfig.mCurrentAnimation == childAnim) {
|
||||||
mConfig.mCurrentAnimation.removeListener(mConfig);
|
clearCurrentAnimation();
|
||||||
mConfig.mCurrentAnimation = null;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -425,6 +421,14 @@ public class LauncherStateManager {
|
|||||||
mConfig.setAnimation(anim, null);
|
mConfig.setAnimation(anim, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void clearCurrentAnimation() {
|
||||||
|
if (mConfig.mCurrentAnimation != null) {
|
||||||
|
mConfig.mCurrentAnimation.removeListener(mConfig);
|
||||||
|
mConfig.mCurrentAnimation = null;
|
||||||
|
}
|
||||||
|
mConfig.playbackController = null;
|
||||||
|
}
|
||||||
|
|
||||||
private class StartAnimRunnable implements Runnable {
|
private class StartAnimRunnable implements Runnable {
|
||||||
|
|
||||||
private final AnimatorSet mAnim;
|
private final AnimatorSet mAnim;
|
||||||
|
|||||||
Reference in New Issue
Block a user