Fix advertising set slot becoming unusable
When the event 'set random address complete' comes right after removing the advertising set, the advertising ID becomes unusable from that moment. This eventually leads to using all advertising slots, which makes impossible to create any new advertising set. This CL fixes the issue by checking existance of a key before accessing advertising_sets_ with [] operator, preventing unintended creation of a map entry. Not only for address rotation complete event, but also this CL adds checks for all accesses to the map which can cause the same problem. Bug: 380772123 Bug: 388615378 Test: atest bluetooth_test_gd_unit Test: Manual, b/380772123#comment15 Flag: com.android.bluetooth.flags.fix_unusable_adv_slot_due_to_map_access Change-Id: I91b6a6647099e49adefe95f1789f6976e33c7bc9
Loading
Please register or sign in to comment