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

Commit eb24c52a authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "Include flags in all connectable packets"

am: eb4b30b5

Change-Id: Id710017c3e63d45ee1b09c82a7f507ef4b3e189e
parents 8afcac5a eb4b30b5
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -78,9 +78,8 @@ namespace {
void DoNothing(uint8_t) {}
void DoNothing2(uint8_t, uint8_t) {}

bool is_legacy_connectable(uint16_t advertising_event_properties) {
  if (((advertising_event_properties & 0x10) != 0) &&
      ((advertising_event_properties & 0x01) != 0)) {
bool is_connectable(uint16_t advertising_event_properties) {
  if ((advertising_event_properties & 0x01) != 0) {
    return true;
  }
  return false;
@@ -566,8 +565,7 @@ class BleAdvertisingManagerImpl
    AdvertisingInstance* p_inst = &adv_inst[inst_id];
    VLOG(1) << "is_scan_rsp = " << is_scan_rsp;

    if (!is_scan_rsp &&
        is_legacy_connectable(p_inst->advertising_event_properties)) {
    if (!is_scan_rsp && is_connectable(p_inst->advertising_event_properties)) {
      uint8_t flags_val = BTM_GENERAL_DISCOVERABLE;

      if (p_inst->timeout_s) flags_val = BTM_LIMITED_DISCOVERABLE;