Snap for 11200327 from 072d07df7f15c07f33f6f5565b0de9e1db0d677b to 24Q1-release
Change-Id: Ie1f329c3fc6a95d39b7329a692b54346e2c3bc94
diff --git a/modules/sensors/dynamic_sensor/HidRawSensor.cpp b/modules/sensors/dynamic_sensor/HidRawSensor.cpp
index 336461c..dcf4b47 100644
--- a/modules/sensors/dynamic_sensor/HidRawSensor.cpp
+++ b/modules/sensors/dynamic_sensor/HidRawSensor.cpp
@@ -1004,9 +1004,6 @@
if (device->getFeature(id, &buffer)
&& (8 * buffer.size()) >=
(mLeTransportBitOffset + mLeTransportBitSize)) {
- constexpr uint8_t kLeAclValue = 0;
- constexpr uint8_t kLeIsoValue = 1;
-
// The following property, if defined, represents a comma-separated list of
// transport preferences for the following types: le-acl or iso-[sw|hw],
// which describes the priority list of transport selections used based on the
@@ -1020,19 +1017,17 @@
}
uint16_t capability = mFeatureInfo.version & 0x0000FFFF;
- uint8_t value;
+ uint8_t index;
if (capability == (kIsoBitMask | kAclBitMask)) {
if (!priorityList.empty() && priorityList[0].compare("le-acl") == 0) {
- value = kLeAclValue;
+ index = mLeTransportAclIndex;
} else {
- value = kLeIsoValue;
+ index = mLeTransportIsoIndex;
}
} else {
- value = (capability & kIsoBitMask) ? kLeIsoValue : kLeAclValue;
+ index = (capability & kIsoBitMask) ? mLeTransportIsoIndex : mLeTransportAclIndex;
}
- uint8_t index = (value == kLeAclValue) ? mLeTransportAclIndex :
- mLeTransportIsoIndex;
HidUtil::copyBits(&index, &(buffer[0]), buffer.size(), 0,
mLeTransportBitOffset, mLeTransportBitSize);
setLeAudioTransportOk = device->setFeature(id, buffer);