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

Commit 80975f5a authored by Archie Pusaka's avatar Archie Pusaka
Browse files

Floss: Prevent propagating SDP failure message during RNR

aosp/2529445 sends a new tBTA_DM_SEARCH on completing RNR, but it is
interpreted as a failed SDP request on btif_dm.cc, because it is
populated with zero num_uuids.
As a side effect, the handler tries to populate some value into the
UUIDs property, and that causes an extraneous call to invoke remote
device property change callback, which breaks Floss.

This CL treats zero num_uuids as a non-failure case.

Bug: 285098711
Test: Verify no "SDP failed" message when pairing a new device

Change-Id: If5d6dfa3290fb3cd6d97588338b31c20154ebf12
parent 9e9b9300
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1759,9 +1759,8 @@ static void btif_dm_search_services_evt(tBTA_DM_SEARCH_EVT event,
        pairing_cb.sdp_attempts = 0;

        // Send UUIDs discovered through EIR to Java to unblock pairing intent
        // when SDP failed or no UUID is discovered
        if (p_data->disc_res.result != BTA_SUCCESS ||
            p_data->disc_res.num_uuids == 0) {
        // when SDP failed
        if (p_data->disc_res.result != BTA_SUCCESS) {
          auto uuids_iter = eir_uuids_cache.find(bd_addr);
          if (uuids_iter != eir_uuids_cache.end()) {
            num_eir_uuids = uuids_iter->second.size();