Loading core/java/android/view/View.java +3 −5 Original line number Diff line number Diff line Loading @@ -11325,11 +11325,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, attachInfo.mHandler.removeCallbacks(action); attachInfo.mViewRootImpl.mChoreographer.removeCallbacks( Choreographer.CALLBACK_ANIMATION, action, null); } else { } // Assume that post will succeed later ViewRootImpl.getRunQueue().removeCallbacks(action); } } return true; } Loading Loading @@ -15103,9 +15102,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (mAttachInfo != null) { mAttachInfo.mViewRootImpl.mChoreographer.removeCallbacks( Choreographer.CALLBACK_ANIMATION, what, who); } else { ViewRootImpl.getRunQueue().removeCallbacks(what); } ViewRootImpl.getRunQueue().removeCallbacks(what); } } graphics/java/android/graphics/drawable/AnimationDrawable.java +6 −3 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ import android.util.AttributeSet; public class AnimationDrawable extends DrawableContainer implements Runnable, Animatable { private final AnimationState mAnimationState; private int mCurFrame = -1; private boolean mAnimating; private boolean mMutated; public AnimationDrawable() { Loading Loading @@ -137,7 +138,7 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An * @return true if the animation is running, false otherwise */ public boolean isRunning() { return mCurFrame > -1; return mAnimating; } /** Loading @@ -153,6 +154,7 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An @Override public void unscheduleSelf(Runnable what) { mCurFrame = -1; mAnimating = false; super.unscheduleSelf(what); } Loading Loading @@ -222,12 +224,13 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An } mCurFrame = frame; selectDrawable(frame); if (unschedule) { if (unschedule || animate) { unscheduleSelf(this); } if (animate) { // Unscheduling may have clobbered this value; restore it to record that we're animating // Unscheduling may have clobbered these values; restore them mCurFrame = frame; mAnimating = true; scheduleSelf(this, SystemClock.uptimeMillis() + mAnimationState.mDurations[frame]); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ public class AnimatedImageView extends ImageView { } private void updateAnim() { Drawable drawable = mAttached ? getDrawable() : null; Drawable drawable = getDrawable(); if (mAttached && mAnim != null) { mAnim.stop(); } Loading Loading
core/java/android/view/View.java +3 −5 Original line number Diff line number Diff line Loading @@ -11325,11 +11325,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, attachInfo.mHandler.removeCallbacks(action); attachInfo.mViewRootImpl.mChoreographer.removeCallbacks( Choreographer.CALLBACK_ANIMATION, action, null); } else { } // Assume that post will succeed later ViewRootImpl.getRunQueue().removeCallbacks(action); } } return true; } Loading Loading @@ -15103,9 +15102,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (mAttachInfo != null) { mAttachInfo.mViewRootImpl.mChoreographer.removeCallbacks( Choreographer.CALLBACK_ANIMATION, what, who); } else { ViewRootImpl.getRunQueue().removeCallbacks(what); } ViewRootImpl.getRunQueue().removeCallbacks(what); } }
graphics/java/android/graphics/drawable/AnimationDrawable.java +6 −3 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ import android.util.AttributeSet; public class AnimationDrawable extends DrawableContainer implements Runnable, Animatable { private final AnimationState mAnimationState; private int mCurFrame = -1; private boolean mAnimating; private boolean mMutated; public AnimationDrawable() { Loading Loading @@ -137,7 +138,7 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An * @return true if the animation is running, false otherwise */ public boolean isRunning() { return mCurFrame > -1; return mAnimating; } /** Loading @@ -153,6 +154,7 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An @Override public void unscheduleSelf(Runnable what) { mCurFrame = -1; mAnimating = false; super.unscheduleSelf(what); } Loading Loading @@ -222,12 +224,13 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An } mCurFrame = frame; selectDrawable(frame); if (unschedule) { if (unschedule || animate) { unscheduleSelf(this); } if (animate) { // Unscheduling may have clobbered this value; restore it to record that we're animating // Unscheduling may have clobbered these values; restore them mCurFrame = frame; mAnimating = true; scheduleSelf(this, SystemClock.uptimeMillis() + mAnimationState.mDurations[frame]); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ public class AnimatedImageView extends ImageView { } private void updateAnim() { Drawable drawable = mAttached ? getDrawable() : null; Drawable drawable = getDrawable(); if (mAttached && mAnim != null) { mAnim.stop(); } Loading