+20
−74
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
In bta_dm_discover_name, when we pass through whole method, and there is no need to read remote name, we end up sending BTA_DM_DISCOVERY_RESULT_EVT. This event is now jointly used by service discovery, and finding devices. Because of this mix up, handler of this event is sending service discovery and device search callbacks together. To clean up this mess, use BTA_DM_DISCOVERY_RESULT_EVT only when service discovery result is present. When name discovery is finished, call next device name discovery directly. Please note that bta_dm_search_cb.wait_disc is never set when reading device name, so there is no need to keep the checks and timer from bta_dm_search_result Bug: 330675788 Flag: exempt, infrastructure refactor that can't be easily isolated Test: mma -j32 Change-Id: I416af873d753c37d8e4349a731aef8076a177170