summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorLais Andrade <lsandrade@google.com>2021-01-20 13:05:58 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-01-21 20:09:23 +0000
commit90e8eea8df16dedd4467eeaa595042e25f898121 (patch)
tree0f772ade7882df90aece8663fb264f732b8a11f8 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent03073d336e2ba11b55c821b5058dc8e1e61e240c (diff)
Fix ANR caused by VibrationThread
The awaitUntil method that waits for vibration completion is waiting on a CountDownLatch in a block synchrnized on the VibrationThread. This causes any call to VibrationThread.cancel() to lock on this wait block and triggers ANR when vibration is cancelled by the main thread. The awaitUntil methods should only wait on the VibrationThread instance so the calls to cancel() will notify and interrupt this wait. Changed the VibrationThreadTest to test the cancel call on a longer vibration pattern, that should cause the test to fail if the Thread is not cancelled right away (i.e. similar conditions that would trigger an ANR on the main thread). Fix: 177974811 Test: VibrationThread Change-Id: Id4346e60292e96df26f5c12e2e088bbf83f416c8 (cherry picked from commit da188d450b5004526cd1b6d4dfa3f7b2b9014599)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions