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

Commit 38b459ff authored by Chienyuan's avatar Chienyuan
Browse files

Prevent CSIS discovery crash when GD disabled

Tag: #refactor
Bug: 201757963
Bug: 150670922
Test: manual
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Iaf8c7b4ecbf47451956958ee00031a6ae063b1ca
parent 7e21d4cb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include "gap_api.h"
#include "gatt_api.h"
#include "main/shim/le_scanning_manager.h"
#include "main/shim/shim.h"
#include "osi/include/osi.h"
#include "osi/include/properties.h"
#include "stack/btm/btm_dev.h"
@@ -1127,7 +1128,9 @@ class CsisClientImpl : public CsisClient {
  void CsisActiveObserverSet(bool enable) {
    LOG(INFO) << __func__ << " CSIS Discovery SET: " << enable;

    if (bluetooth::shim::is_gd_scanning_enabled()) {
      bluetooth::shim::set_empty_filter(enable);
    }

    BTA_DmBleCsisObserve(
        enable, [](tBTA_DM_SEARCH_EVT event, tBTA_DM_SEARCH* p_data) {
+1 −0
Original line number Diff line number Diff line
@@ -264,6 +264,7 @@ filegroup {
    name: "TestMockMainShimLeScanning",
    srcs: [
      "mock/mock_main_shim_le_scanning_manager.cc",
      "mock/mock_main_shim.cc",
    ],
}