Loading android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +12 −1 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ class AdapterProperties { private boolean mIsLePeriodicAdvertisingSyncTransferRecipientSupported; private boolean mIsLeConnectedIsochronousStreamCentralSupported; private boolean mIsLeIsochronousBroadcasterSupported; private boolean mIsLeChannelSoundingSupported; private boolean mReceiverRegistered; Loading Loading @@ -524,6 +525,13 @@ class AdapterProperties { return mIsLeIsochronousBroadcasterSupported; } /** * @return the mIsLeChannelSoundingSupported */ boolean isLeChannelSoundingSupported() { return mIsLeChannelSoundingSupported; } /** * @return the getLeMaximumAdvertisingDataLength */ Loading Loading @@ -1080,6 +1088,7 @@ class AdapterProperties { mIsLeIsochronousBroadcasterSupported = ((0xFF & ((int) val[26])) != 0); mIsLePeriodicAdvertisingSyncTransferRecipientSupported = ((0xFF & ((int) val[27])) != 0); mIsOffloadedTransportDiscoveryDataScanSupported = ((0x01 & ((int) val[28])) != 0); mIsLeChannelSoundingSupported = ((0xFF & ((int) val[30])) != 0); Log.d( TAG, Loading Loading @@ -1127,7 +1136,9 @@ class AdapterProperties { + " mIsLePeriodicAdvertisingSyncTransferRecipientSupported = " + mIsLePeriodicAdvertisingSyncTransferRecipientSupported + " mIsOffloadedTransportDiscoveryDataScanSupported = " + mIsOffloadedTransportDiscoveryDataScanSupported); + mIsOffloadedTransportDiscoveryDataScanSupported + " mIsLeChannelSoundingSupported = " + mIsLeChannelSoundingSupported); invalidateIsOffloadedFilteringSupportedCache(); } Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +9 −0 Original line number Diff line number Diff line Loading @@ -5767,6 +5767,15 @@ public class AdapterService extends Service { .isLePeriodicAdvertisingSyncTransferRecipientSupported()); } /** * Check if the LE channel sounding feature is supported. * * @return true, if the LE channel sounding is supported */ public boolean isLeChannelSoundingSupported() { return mAdapterProperties.isLeChannelSoundingSupported(); } public long getSupportedProfilesBitMask() { return Config.getSupportedProfilesBitMask(); } Loading android/app/src/com/android/bluetooth/gatt/DistanceMeasurementManager.java +12 −4 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.util.Log; import com.android.bluetooth.btservice.AdapterService; import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayList; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArraySet; Loading Loading @@ -71,12 +72,19 @@ public class DistanceMeasurementManager { } DistanceMeasurementMethod[] getSupportedDistanceMeasurementMethods() { DistanceMeasurementMethod rssi = ArrayList<DistanceMeasurementMethod> methods = new ArrayList<DistanceMeasurementMethod>(); methods.add( new DistanceMeasurementMethod.Builder( DistanceMeasurementMethod.DISTANCE_MEASUREMENT_METHOD_RSSI) .build(); DistanceMeasurementMethod[] methods = {rssi}; return methods; .build()); if (mAdapterService.isLeChannelSoundingSupported()) { methods.add( new DistanceMeasurementMethod.Builder( DistanceMeasurementMethod .DISTANCE_MEASUREMENT_METHOD_CHANNEL_SOUNDING) .build()); } return methods.toArray(new DistanceMeasurementMethod[methods.size()]); } void startDistanceMeasurement( Loading system/btif/src/btif_core.cc +2 −0 Original line number Diff line number Diff line Loading @@ -522,6 +522,8 @@ void btif_get_adapter_property(bt_property_type_t type) { controller->SupportsBlePeriodicAdvertisingSyncTransferRecipient(); local_le_features.adv_filter_extended_features_mask = cmn_vsc_cb.adv_filter_extended_features_mask; local_le_features.le_channel_sounding_supported = controller->SupportsBleChannelSounding(); memcpy(prop.val, &local_le_features, prop.len); } else if (prop.type == BT_PROPERTY_DYNAMIC_AUDIO_BUFFER) { Loading system/gd/discovery/device/bt_property.cc +4 −2 Original line number Diff line number Diff line Loading @@ -152,7 +152,8 @@ std::string bt_property_text(const bt_property_t& property) { " le_connected_isochronous_stream_central_supported:%d " "le_isochronous_broadcast_supported:%d" " le_periodic_advertising_sync_transfer_recipient_supported:%d " "adv_filter_extended_features_mask:%d", "adv_filter_extended_features_mask:%d" "le_channel_sounding_supported:%d ", bt_property_type_text(property.type).c_str(), ((bt_local_le_features_t*)property.val)->version_supported, ((bt_local_le_features_t*)property.val)->local_privacy_enabled, Loading @@ -178,7 +179,8 @@ std::string bt_property_text(const bt_property_t& property) { ((bt_local_le_features_t*)property.val)->le_isochronous_broadcast_supported, ((bt_local_le_features_t*)property.val) ->le_periodic_advertising_sync_transfer_recipient_supported, ((bt_local_le_features_t*)property.val)->adv_filter_extended_features_mask); ((bt_local_le_features_t*)property.val)->adv_filter_extended_features_mask, ((bt_local_le_features_t*)property.val)->le_channel_sounding_supported); case BT_PROPERTY_RESERVED_0E: return base::StringPrintf("type:%s", bt_property_type_text(property.type).c_str()); Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +12 −1 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ class AdapterProperties { private boolean mIsLePeriodicAdvertisingSyncTransferRecipientSupported; private boolean mIsLeConnectedIsochronousStreamCentralSupported; private boolean mIsLeIsochronousBroadcasterSupported; private boolean mIsLeChannelSoundingSupported; private boolean mReceiverRegistered; Loading Loading @@ -524,6 +525,13 @@ class AdapterProperties { return mIsLeIsochronousBroadcasterSupported; } /** * @return the mIsLeChannelSoundingSupported */ boolean isLeChannelSoundingSupported() { return mIsLeChannelSoundingSupported; } /** * @return the getLeMaximumAdvertisingDataLength */ Loading Loading @@ -1080,6 +1088,7 @@ class AdapterProperties { mIsLeIsochronousBroadcasterSupported = ((0xFF & ((int) val[26])) != 0); mIsLePeriodicAdvertisingSyncTransferRecipientSupported = ((0xFF & ((int) val[27])) != 0); mIsOffloadedTransportDiscoveryDataScanSupported = ((0x01 & ((int) val[28])) != 0); mIsLeChannelSoundingSupported = ((0xFF & ((int) val[30])) != 0); Log.d( TAG, Loading Loading @@ -1127,7 +1136,9 @@ class AdapterProperties { + " mIsLePeriodicAdvertisingSyncTransferRecipientSupported = " + mIsLePeriodicAdvertisingSyncTransferRecipientSupported + " mIsOffloadedTransportDiscoveryDataScanSupported = " + mIsOffloadedTransportDiscoveryDataScanSupported); + mIsOffloadedTransportDiscoveryDataScanSupported + " mIsLeChannelSoundingSupported = " + mIsLeChannelSoundingSupported); invalidateIsOffloadedFilteringSupportedCache(); } Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +9 −0 Original line number Diff line number Diff line Loading @@ -5767,6 +5767,15 @@ public class AdapterService extends Service { .isLePeriodicAdvertisingSyncTransferRecipientSupported()); } /** * Check if the LE channel sounding feature is supported. * * @return true, if the LE channel sounding is supported */ public boolean isLeChannelSoundingSupported() { return mAdapterProperties.isLeChannelSoundingSupported(); } public long getSupportedProfilesBitMask() { return Config.getSupportedProfilesBitMask(); } Loading
android/app/src/com/android/bluetooth/gatt/DistanceMeasurementManager.java +12 −4 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.util.Log; import com.android.bluetooth.btservice.AdapterService; import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayList; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArraySet; Loading Loading @@ -71,12 +72,19 @@ public class DistanceMeasurementManager { } DistanceMeasurementMethod[] getSupportedDistanceMeasurementMethods() { DistanceMeasurementMethod rssi = ArrayList<DistanceMeasurementMethod> methods = new ArrayList<DistanceMeasurementMethod>(); methods.add( new DistanceMeasurementMethod.Builder( DistanceMeasurementMethod.DISTANCE_MEASUREMENT_METHOD_RSSI) .build(); DistanceMeasurementMethod[] methods = {rssi}; return methods; .build()); if (mAdapterService.isLeChannelSoundingSupported()) { methods.add( new DistanceMeasurementMethod.Builder( DistanceMeasurementMethod .DISTANCE_MEASUREMENT_METHOD_CHANNEL_SOUNDING) .build()); } return methods.toArray(new DistanceMeasurementMethod[methods.size()]); } void startDistanceMeasurement( Loading
system/btif/src/btif_core.cc +2 −0 Original line number Diff line number Diff line Loading @@ -522,6 +522,8 @@ void btif_get_adapter_property(bt_property_type_t type) { controller->SupportsBlePeriodicAdvertisingSyncTransferRecipient(); local_le_features.adv_filter_extended_features_mask = cmn_vsc_cb.adv_filter_extended_features_mask; local_le_features.le_channel_sounding_supported = controller->SupportsBleChannelSounding(); memcpy(prop.val, &local_le_features, prop.len); } else if (prop.type == BT_PROPERTY_DYNAMIC_AUDIO_BUFFER) { Loading
system/gd/discovery/device/bt_property.cc +4 −2 Original line number Diff line number Diff line Loading @@ -152,7 +152,8 @@ std::string bt_property_text(const bt_property_t& property) { " le_connected_isochronous_stream_central_supported:%d " "le_isochronous_broadcast_supported:%d" " le_periodic_advertising_sync_transfer_recipient_supported:%d " "adv_filter_extended_features_mask:%d", "adv_filter_extended_features_mask:%d" "le_channel_sounding_supported:%d ", bt_property_type_text(property.type).c_str(), ((bt_local_le_features_t*)property.val)->version_supported, ((bt_local_le_features_t*)property.val)->local_privacy_enabled, Loading @@ -178,7 +179,8 @@ std::string bt_property_text(const bt_property_t& property) { ((bt_local_le_features_t*)property.val)->le_isochronous_broadcast_supported, ((bt_local_le_features_t*)property.val) ->le_periodic_advertising_sync_transfer_recipient_supported, ((bt_local_le_features_t*)property.val)->adv_filter_extended_features_mask); ((bt_local_le_features_t*)property.val)->adv_filter_extended_features_mask, ((bt_local_le_features_t*)property.val)->le_channel_sounding_supported); case BT_PROPERTY_RESERVED_0E: return base::StringPrintf("type:%s", bt_property_type_text(property.type).c_str()); Loading