commit | a46ffb23d418cccdf1efb7ebd9a3b1b38bf4b7d8 | [log] [tgz] |
---|---|---|
author | lijilou <lijilou@xiaomi.corp-partner.google.com> | Thu May 23 13:41:19 2024 +0800 |
committer | Jilou li <lijilou@xiaomi.corp-partner.google.com> | Thu May 23 06:02:57 2024 +0000 |
tree | 89454e8a7b6bae1fe4ed242cf86851401e82b80e | |
parent | 8089347daf9365edc8d585c1dd1e63b5c885ef30 [diff] |
SystemSensorManager:fix CWE problem by add lock. When receive the DYNAMIC_SENSOR_CHANGED broadcast,thread A will call the updateDynamicSensorList method to traverse mDynamicSensorCallbacks map. Meanwhile,thread B call the register/unregister the dynamicSensorCallback, it may cause CWE.So we should add a lock to protect. Test: OEM monkey test Bug: 342282013 Change-Id: Ic380ae23ecdcb0f501e85b19db4fcabc275f17c5