summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramVertexFixedFunction.java
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-20 16:53:15 +0000
commit9273e41bd5491e5fae0942ae39707ae5a8a3cbe5 (patch)
treeac041e63be8a64ce4e75e7301e81ffbbca7918ef /rs/java/android/renderscript/ProgramVertexFixedFunction.java
parent971656a9dff0f4087ca8ab251dd1d2fef46539a5 (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 966e8f29f634e4f2296c2ca8bacaa47def9fe8cf)
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions