OSDN Git Service

Camera2: Protect MarshalRegistry against concurrent access
authorEino-Ville Talvala <etalvala@google.com>
Thu, 9 Jun 2016 20:08:59 +0000 (13:08 -0700)
committerEino-Ville Talvala <etalvala@google.com>
Fri, 10 Jun 2016 17:28:34 +0000 (10:28 -0700)
commit4a2c7c55492d2fcae1d8bdbf169d4c4fb710e800
tree0672113ec5e7527fa241a73a600c5799add055f7
parent9675f16bba6837840038aea92e9db5893cecd33e
Camera2: Protect MarshalRegistry against concurrent access

Multiple CameraMetadataNative objects could be reading and writing
to the metadata marshaler registry simultaneously.

This can lead to an infinite loop in the HashMap in the worst case,
so add synchronization against this.

Bug: 29043079
Change-Id: Ic5e9e58a9333b99b4bea87bf790c9fbfadfbbea9
core/java/android/hardware/camera2/marshal/MarshalRegistry.java