Camera: Fix race condition for filterSPerfClassCharacteristics
1. enumerateProviders may be called from different threads: from
cameraserver startup, and from the provider's onRegistration.
When enumerateProviders calls filterSPerfClassCharacteristics,
mServiceLock needs to be held.
2. onRegistration can be called with preexisting set to TRUE. In that
case, do not call onNewProviderRegistered() to avoid unnecessary
enumerateProviders.
Test: vendor testing, camera CTS
Bug: 193796282
Change-Id: I596a047cb36a9926014de232a6639a32da4f214c
3 files changed