Loading system/gd/hci/acl_manager/classic_impl.h +4 −0 Original line number Diff line number Diff line Loading @@ -629,6 +629,8 @@ struct classic_impl : public security::ISecurityManagerListener { auto view = ReadRemoteSupportedFeaturesCompleteView::Create(packet); ASSERT_LOG(view.IsValid(), "Read remote supported features packet invalid"); uint16_t handle = view.GetConnectionHandle(); bluetooth::os::LogMetricBluetoothRemoteSupportedFeatures( connections.get_address(handle), 0, view.GetLmpFeatures(), handle); connections.execute(handle, [=](ConnectionManagementCallbacks* callbacks) { callbacks->OnReadRemoteSupportedFeaturesComplete(view.GetLmpFeatures()); }); Loading @@ -638,6 +640,8 @@ struct classic_impl : public security::ISecurityManagerListener { auto view = ReadRemoteExtendedFeaturesCompleteView::Create(packet); ASSERT_LOG(view.IsValid(), "Read remote extended features packet invalid"); uint16_t handle = view.GetConnectionHandle(); bluetooth::os::LogMetricBluetoothRemoteSupportedFeatures( connections.get_address(handle), view.GetPageNumber(), view.GetExtendedLmpFeatures(), handle); connections.execute(handle, [=](ConnectionManagementCallbacks* callbacks) { callbacks->OnReadRemoteExtendedFeaturesComplete( view.GetPageNumber(), view.GetMaximumPageNumber(), view.GetExtendedLmpFeatures()); Loading system/gd/os/android/metrics.cc +19 −0 Original line number Diff line number Diff line Loading @@ -463,6 +463,25 @@ void LogMetricBluetoothDisconnectionReasonReported( } } void LogMetricBluetoothRemoteSupportedFeatures( const Address& address, uint32_t page, uint64_t features, uint32_t connection_handle) { int metric_id = 0; if (!address.IsEmpty()) { metric_id = MetricIdManager::GetInstance().AllocateId(address); } int ret = stats_write(BLUETOOTH_REMOTE_SUPPORTED_FEATURES_REPORTED, metric_id, page, features, connection_handle); if (ret < 0) { LOG_WARN( "Failed for LogMetricBluetoothRemoteSupportedFeatures, " "metric_id %d, page %d, features %s, connection_handle %d, error %d", metric_id, page, std::to_string(features).c_str(), connection_handle, ret); } } void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) { int ret = stats_write(BLUETOOTH_CODE_PATH_COUNTER, key, count); if (ret < 0) { Loading system/gd/os/host/metrics.cc +3 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,9 @@ void LogMetricBluetoothLocalVersions( void LogMetricBluetoothDisconnectionReasonReported( uint32_t reason, const Address& address, uint32_t connection_handle) {} void LogMetricBluetoothRemoteSupportedFeatures( const Address& address, uint32_t page, uint64_t features, uint32_t connection_handle) {} void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) {} } // namespace os } // namespace bluetooth system/gd/os/linux/metrics.cc +3 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,9 @@ void LogMetricBluetoothLocalVersions( void LogMetricBluetoothDisconnectionReasonReported( uint32_t reason, const Address& address, uint32_t connection_handle) {} void LogMetricBluetoothRemoteSupportedFeatures( const Address& address, uint32_t page, uint64_t features, uint32_t connection_handle) {} void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) {} } // namespace os Loading system/gd/os/metrics.h +3 −0 Original line number Diff line number Diff line Loading @@ -278,6 +278,9 @@ void LogMetricBluetoothLocalVersions( void LogMetricBluetoothDisconnectionReasonReported( uint32_t reason, const hci::Address& address, uint32_t connection_handle); void LogMetricBluetoothRemoteSupportedFeatures( const hci::Address& address, uint32_t page, uint64_t features, uint32_t connection_handle); void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count); } // namespace os Loading Loading
system/gd/hci/acl_manager/classic_impl.h +4 −0 Original line number Diff line number Diff line Loading @@ -629,6 +629,8 @@ struct classic_impl : public security::ISecurityManagerListener { auto view = ReadRemoteSupportedFeaturesCompleteView::Create(packet); ASSERT_LOG(view.IsValid(), "Read remote supported features packet invalid"); uint16_t handle = view.GetConnectionHandle(); bluetooth::os::LogMetricBluetoothRemoteSupportedFeatures( connections.get_address(handle), 0, view.GetLmpFeatures(), handle); connections.execute(handle, [=](ConnectionManagementCallbacks* callbacks) { callbacks->OnReadRemoteSupportedFeaturesComplete(view.GetLmpFeatures()); }); Loading @@ -638,6 +640,8 @@ struct classic_impl : public security::ISecurityManagerListener { auto view = ReadRemoteExtendedFeaturesCompleteView::Create(packet); ASSERT_LOG(view.IsValid(), "Read remote extended features packet invalid"); uint16_t handle = view.GetConnectionHandle(); bluetooth::os::LogMetricBluetoothRemoteSupportedFeatures( connections.get_address(handle), view.GetPageNumber(), view.GetExtendedLmpFeatures(), handle); connections.execute(handle, [=](ConnectionManagementCallbacks* callbacks) { callbacks->OnReadRemoteExtendedFeaturesComplete( view.GetPageNumber(), view.GetMaximumPageNumber(), view.GetExtendedLmpFeatures()); Loading
system/gd/os/android/metrics.cc +19 −0 Original line number Diff line number Diff line Loading @@ -463,6 +463,25 @@ void LogMetricBluetoothDisconnectionReasonReported( } } void LogMetricBluetoothRemoteSupportedFeatures( const Address& address, uint32_t page, uint64_t features, uint32_t connection_handle) { int metric_id = 0; if (!address.IsEmpty()) { metric_id = MetricIdManager::GetInstance().AllocateId(address); } int ret = stats_write(BLUETOOTH_REMOTE_SUPPORTED_FEATURES_REPORTED, metric_id, page, features, connection_handle); if (ret < 0) { LOG_WARN( "Failed for LogMetricBluetoothRemoteSupportedFeatures, " "metric_id %d, page %d, features %s, connection_handle %d, error %d", metric_id, page, std::to_string(features).c_str(), connection_handle, ret); } } void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) { int ret = stats_write(BLUETOOTH_CODE_PATH_COUNTER, key, count); if (ret < 0) { Loading
system/gd/os/host/metrics.cc +3 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,9 @@ void LogMetricBluetoothLocalVersions( void LogMetricBluetoothDisconnectionReasonReported( uint32_t reason, const Address& address, uint32_t connection_handle) {} void LogMetricBluetoothRemoteSupportedFeatures( const Address& address, uint32_t page, uint64_t features, uint32_t connection_handle) {} void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) {} } // namespace os } // namespace bluetooth
system/gd/os/linux/metrics.cc +3 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,9 @@ void LogMetricBluetoothLocalVersions( void LogMetricBluetoothDisconnectionReasonReported( uint32_t reason, const Address& address, uint32_t connection_handle) {} void LogMetricBluetoothRemoteSupportedFeatures( const Address& address, uint32_t page, uint64_t features, uint32_t connection_handle) {} void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) {} } // namespace os Loading
system/gd/os/metrics.h +3 −0 Original line number Diff line number Diff line Loading @@ -278,6 +278,9 @@ void LogMetricBluetoothLocalVersions( void LogMetricBluetoothDisconnectionReasonReported( uint32_t reason, const hci::Address& address, uint32_t connection_handle); void LogMetricBluetoothRemoteSupportedFeatures( const hci::Address& address, uint32_t page, uint64_t features, uint32_t connection_handle); void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count); } // namespace os Loading