Loading core/java/android/animation/ValueAnimator.java +11 −4 Original line number Diff line number Diff line Loading @@ -1029,8 +1029,16 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio @Override public void resume() { if (mPaused) { if (Looper.myLooper() == null) { throw new AndroidRuntimeException("Animators may only be resumed from the same " + "thread that the animator was started on"); } if (mPaused && !mResumed) { mResumed = true; if (mPauseTime > 0) { AnimationHandler handler = AnimationHandler.getInstance(); handler.addAnimationFrameCallback(this, 0); } } super.resume(); } Loading Loading @@ -1235,9 +1243,8 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio } mLastFrameTime = frameTime; if (mPaused) { if (mPauseTime < 0) { mPauseTime = frameTime; } handler.removeCallback(this); return; } else if (mResumed) { mResumed = false; Loading core/tests/coretests/src/android/animation/ValueAnimatorTests.java +6 −1 Original line number Diff line number Diff line Loading @@ -328,7 +328,12 @@ public class ValueAnimatorTests extends ActivityInstrumentationTestCase2<BasicAn // Only a1's pause listener should be called. assertTrue(l1.pauseCalled); assertFalse(l1.resumeCalled); runTestOnUiThread(new Runnable() { @Override public void run() { a1.resume(); } }); Thread.sleep(a1.getTotalDuration()); Loading Loading
core/java/android/animation/ValueAnimator.java +11 −4 Original line number Diff line number Diff line Loading @@ -1029,8 +1029,16 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio @Override public void resume() { if (mPaused) { if (Looper.myLooper() == null) { throw new AndroidRuntimeException("Animators may only be resumed from the same " + "thread that the animator was started on"); } if (mPaused && !mResumed) { mResumed = true; if (mPauseTime > 0) { AnimationHandler handler = AnimationHandler.getInstance(); handler.addAnimationFrameCallback(this, 0); } } super.resume(); } Loading Loading @@ -1235,9 +1243,8 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio } mLastFrameTime = frameTime; if (mPaused) { if (mPauseTime < 0) { mPauseTime = frameTime; } handler.removeCallback(this); return; } else if (mResumed) { mResumed = false; Loading
core/tests/coretests/src/android/animation/ValueAnimatorTests.java +6 −1 Original line number Diff line number Diff line Loading @@ -328,7 +328,12 @@ public class ValueAnimatorTests extends ActivityInstrumentationTestCase2<BasicAn // Only a1's pause listener should be called. assertTrue(l1.pauseCalled); assertFalse(l1.resumeCalled); runTestOnUiThread(new Runnable() { @Override public void run() { a1.resume(); } }); Thread.sleep(a1.getTotalDuration()); Loading