Snap for 11216811 from 070e169bdbe050a193b1f34feb461360572618a5 to 24Q1-release
Change-Id: If2292b8763e0cf61a33b893aaabe63007f9ab102
diff --git a/modules/sensors/dynamic_sensor/HidRawSensor.cpp b/modules/sensors/dynamic_sensor/HidRawSensor.cpp
index dcf4b47..939b58d 100644
--- a/modules/sensors/dynamic_sensor/HidRawSensor.cpp
+++ b/modules/sensors/dynamic_sensor/HidRawSensor.cpp
@@ -998,7 +998,7 @@
std::vector<uint8_t> buffer;
// TODO(b/298450041): Refactor the operations below in a separate function.
bool setLeAudioTransportOk = true;
- if (mLeTransportId >= 0) {
+ if (mLeTransportId >= 0 && enable) {
setLeAudioTransportOk = false;
uint8_t id = static_cast<uint8_t>(mLeTransportId);
if (device->getFeature(id, &buffer)