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

Commit 2fa1c35c authored by William Escande's avatar William Escande
Browse files

Do not report read remote feature if it failed

Bug: 328841620
Fix: 328841620
Test: m .
Flag: Exempt obvious status check
Change-Id: I000f70198226dfec35bafce1616128714e5ec95b
parent cf23fb65
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);