summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramVertexFixedFunction.java
diff options
context:
space:
mode:
authorAndrea Ambu <andreaambu@google.com>2021-07-09 14:43:35 +0100
committerAndrea Ambu <andreaambu@google.com>2021-07-12 15:22:00 +0000
commitb09de4738d27cf445afbd67cbddc87db6f61f509 (patch)
treeeb29ba1f1c24abd7ecf8572e4b11eb6004476ae6 /rs/java/android/renderscript/ProgramVertexFixedFunction.java
parentbe851a2ae33ca017337b4a281f655944ac8057f4 (diff)
speech: Fix RemoteSpeechReco race condition
stopListening schedules a Runnable referring to mDelegatingListener. mDelegatingListener can be set to null before the Runnable runs, causing NullPointerException when it does run. This CL defines a local alias for the current mDelegatingListener reference, and uses this new alias in the Runnable closure. After this CL, even if mDelegatingListener changes between stopListening and run(), run() will always use the DelegatingListener mDelegatingListener was pointing to at schedule-time rather than run-time. Bug: 193046622 Test: atest CtsVoiceRecognitionTestCases Change-Id: I98b4fabf074873ce17e4046e243fe22f9e541f91 (cherry picked from commit a3312942cd826d627057a97df37a49da61c63458)
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions