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

Commit 9caa79ea authored by Jack He's avatar Jack He Committed by Automerger Merge Worker
Browse files

Merge "GD: set advertiser id in_use in the lock" am: 64dc9fd9 am: 1335ce7e...

Merge "GD: set advertiser id in_use in the lock" am: 64dc9fd9 am: 1335ce7e am: 952b563a am: cde63a10

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2074740



Change-Id: I49d2db2805a5b758d2fb01be1b29586422106650
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7f7c1feb cde63a10
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ struct Advertiser {
  bool started = false;
  bool connectable = false;
  bool directed = false;
  bool in_use = false;
  std::unique_ptr<os::Alarm> address_rotation_alarm;
};

@@ -221,10 +222,11 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb
      while (id < num_instances_ && advertising_sets_.count(id) != 0) {
        id++;
      }
    }
      if (id == num_instances_) {
        return kInvalidId;
      }
      advertising_sets_[id].in_use = true;
    }
    return id;
  }