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

Commit 92a1d490 authored by Chienyuan's avatar Chienyuan
Browse files

gd hci: Check extended feature supported when read remote feature complete

Tag: #gd-refactor
Bug: 185972929
Test: gd/cert/run
Change-Id: Id8bbb197694e2e68211968c46fe556062a60f31c
parent 6ecf56d0
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -578,8 +578,14 @@ struct classic_impl : public security::ISecurityManagerListener {
      ASSERT(!crash_on_unknown_handle_);
      return;
    }

    bool is_remote_support_extended_features = view.GetLmpFeatures() & (0x1ULL << 63);
    if (controller_->IsSupported(OpCode::READ_LOCAL_EXTENDED_FEATURES) && is_remote_support_extended_features) {
      callbacks->OnReadRemoteExtendedFeaturesComplete(0, 1, view.GetLmpFeatures());
    } else {
      callbacks->OnReadRemoteExtendedFeaturesComplete(0, 0, view.GetLmpFeatures());
    }
  }

  void on_read_remote_extended_features_complete(EventView packet) {
    auto view = ReadRemoteExtendedFeaturesCompleteView::Create(packet);