Skip to content
Commit 0f19cc3e authored by Avichal Rakesh's avatar Avichal Rakesh
Browse files

Ensure that two threads cannot simultaneously close SurfaceImage

SurfaceImage's `close` method is not thread safe but can be called by
multiple threads. If two threads call `SurfaceImage#close`
simulatneously, it can cause ImageReader to throw
IllegalArgumentException.

This CL synchronizes the `close` method to prevent spurious exceptions
from being thrown when multiple threads attempt to close a SurfaceImage.

Bug: 223447712
Test: All existing CTS tests pass on Oriole
Change-Id: I49426b771736e378862e1550124e65c26f5d7c1b
parent 476efd5f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment