Skip to content
Commit b41f317d authored by Winson Chung's avatar Winson Chung
Browse files

Skip cancel of physics animators if not needed

- For some reason calling cancelAction() with no animations still takes
  ~2s while testing, which causes tests to take multiple seconds to tear
  down

Without change:
[76/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testAnimationsUpdatedWhileInMotion: PASSED (4.743s)
[77/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFling: PASSED (4.441s)
[78/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingRespectsMinMax: PASSED (4.090s)
[79/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingThenSpring: IGNORED (0ms)
[80/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testSpringOneProperty: PASSED (4.517s)
[81/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testIsPropertyAnimating: PASSED (4.768s)
[82/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testUpdateListeners: PASSED (4.795s)
[83/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingThenSpring_objectOutsideFlingBounds: PASSED (4.741s)
[84/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testListenersNotCalledOnSubsequentAnimations: PASSED (4.818s)
[85/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testAnimationsUpdatedWhileInMotion_originalListenersStillCalled: IGNORED (0ms)
[86/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testSpringMultipleProperties: PASSED (4.491s)
[87/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingToMinMaxThenSpring: PASSED (4.743s)
[88/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testExtensionProperty: PASSED (4.365s)
[89/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testOneAnimatorPerView: PASSED (8.053s)
[90/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testEndListenersAndActions: IGNORED (0ms)

With change:
[76/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testAnimationsUpdatedWhileInMotion: PASSED (755ms)
[77/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFling: PASSED (427ms)
[78/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingRespectsMinMax: PASSED (126ms)
[79/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingThenSpring: IGNORED (0ms)
[80/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testSpringOneProperty: PASSED (503ms)
[81/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testIsPropertyAnimating: PASSED (756ms)
[82/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testUpdateListeners: PASSED (804ms)
[83/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingThenSpring_objectOutsideFlingBounds: PASSED (779ms)
[84/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testListenersNotCalledOnSubsequentAnimations: PASSED (804ms)
[85/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testAnimationsUpdatedWhileInMotion_originalListenersStillCalled: IGNORED (1ms)
[86/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testSpringMultipleProperties: PASSED (502ms)
[87/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingToMinMaxThenSpring: PASSED (728ms)
[88/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testExtensionProperty: PASSED (326ms)
[89/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testOneAnimatorPerView: PASSED (50ms)
[90/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testEndListenersAndActions: IGNORED (0ms)

Bug: 238577469
Test: atest WMShellUnitTests
Change-Id: Id378ababb9b0542bbc5a17caebaa42f2f9fb4f33
parent d69a267b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment