DescriptionSurfaceTextureHelper: Fix startListening()/stopListening() race
SurfaceTextureHelper.startListening() is asynchronous and posts a Runnable to the handler thread. If stopListening() is called before that Runnable is executed, the Runnable will set the listener after stopListening() has been called. Then the next call to startListening() will fail with "SurfaceTextureHelper listener has already been set."
This CL adds a test to reproduce this bug, and a fix.
BUG=5519
,b/27677772
Committed: https://crrev.com/d8ddb796e44b0773d3e6e65b6d1ee7b05d524129
Cr-Commit-Position: refs/heads/master@{#12030}
Patch Set 1 #
Messages
Total messages: 13 (8 generated)
|