commit | 7f25e5f57f25ec798edc781423d7a29234e67f1b | [log] [tgz] |
---|---|---|
author | Emilian Peev <epeev@google.com> | Wed Apr 11 16:50:34 2018 +0100 |
committer | Emilian Peev <epeev@google.com> | Wed Apr 11 16:50:34 2018 +0100 |
tree | 9aa5cea2b61f2218802219fb725b61609f38088e | |
parent | fa33327eb3b81bf1f2173bef0d13ced98b1221c1 [diff] |
Camera: Synchronize access to torch status map 'add-/removeStates()' can modify the torch status map without holding the necessary 'mTorchStatusMutex'. Any such modification could theoretically access or contribute to an inconsistent state of the torch status map. To avoid any possible data race conditions, always try to acquire 'mTorchStatusMutex' first. Bug: 77531948 Test: Camera CTS Change-Id: Ic135d450d4d32224964eabceb24718e03a439fc3