Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bcca774a authored by Jorge Gil's avatar Jorge Gil
Browse files

Use AnimatorTestRule to end animators during tests

Using runOnUiThread to execute code that starts an Animator allows the
animation to keep running beyond the lifetime of the test. This led to
an eventual crash in WMShellUnitTests when the exit desktop animation
finished and attempted to end() a jank CUJ, who no longer had a worker
thread to work with and caused a NPE.
Instead, run the test in a looper thread and use AnimatorTestRule to
advance time to the end of the animation before the test finishes.

Fix: 374328725
Fix: 375386897
Fix: 375386605
Fix: 375396353
Fix: 375397302
Flag: EXEMPT bugfix
Test: atest WMShellModuleTests - no crashes

Change-Id: I888b467972bf3974960a4d210d7f8a0d1ef4f306
parent 7e1bc07d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment