Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1572a42f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Do not report read remote feature if it failed" into main

parents caf04801 2fa1c35c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -624,6 +624,11 @@ public:
    auto view = ReadRemoteSupportedFeaturesCompleteView::Create(packet);
    log::assert_that(view.IsValid(), "Read remote supported features packet invalid");
    uint16_t handle = view.GetConnectionHandle();
    auto status = view.GetStatus();
    if (status != ErrorCode::SUCCESS) {
      log::error("handle:{} status:{}", handle, ErrorCodeText(status));
      return;
    }
    bluetooth::os::LogMetricBluetoothRemoteSupportedFeatures(connections.get_address(handle), 0,
                                                             view.GetLmpFeatures(), handle);
    connections.execute(handle, [=](ConnectionManagementCallbacks* callbacks) {
@@ -635,6 +640,11 @@ public:
    auto view = ReadRemoteExtendedFeaturesCompleteView::Create(packet);
    log::assert_that(view.IsValid(), "Read remote extended features packet invalid");
    uint16_t handle = view.GetConnectionHandle();
    auto status = view.GetStatus();
    if (status != ErrorCode::SUCCESS) {
      log::error("handle:{} status:{}", handle, ErrorCodeText(status));
      return;
    }
    bluetooth::os::LogMetricBluetoothRemoteSupportedFeatures(connections.get_address(handle),
                                                             view.GetPageNumber(),
                                                             view.GetExtendedLmpFeatures(), handle);