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

Commit 4f3da996 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "gd: Set scan response data based on AdvertisingType" am: c147b270 am: d91b6a50

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1545233

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib81eb5189c1b48a8c1e24959e6b4adb474966735
parents e59d580b d91b6a50
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -221,7 +221,8 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb
    switch (advertising_api_type_) {
      case (AdvertisingApiType::LEGACY): {
        set_parameters(id, config);
        if (!config.scan_response.empty()) {
        if (config.advertising_type == AdvertisingType::ADV_IND ||
            config.advertising_type == AdvertisingType::ADV_NONCONN_IND) {
          set_data(id, true, config.scan_response);
        }
        set_data(id, false, config.advertisement);
@@ -233,7 +234,8 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb
      } break;
      case (AdvertisingApiType::ANDROID_HCI): {
        set_parameters(id, config);
        if (!config.scan_response.empty()) {
        if (config.advertising_type == AdvertisingType::ADV_IND ||
            config.advertising_type == AdvertisingType::ADV_NONCONN_IND) {
          set_data(id, true, config.scan_response);
        }
        set_data(id, false, config.advertisement);
@@ -291,8 +293,8 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb
      advertising_sets_[id].current_address =
          AddressWithType(controller_->GetMacAddress(), AddressType::PUBLIC_DEVICE_ADDRESS);
    }

    if (!config.scan_response.empty()) {
    if (config.advertising_type == AdvertisingType::ADV_IND ||
        config.advertising_type == AdvertisingType::ADV_NONCONN_IND) {
      set_data(id, true, config.scan_response);
    }
    set_data(id, false, config.advertisement);