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

Commit 85e72d9b authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi
Browse files

floss: Fix breakage from EIR change

Fixes 0e106007: Save UUIDs using properties rather than
pairing_cb_t.

Bug: 243398199
Tag: #floss
Test: ./build.py
Change-Id: I27d80e228dbe5c8cf0646cc45f82741e544cb5b4
parent 8ae054be
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1314,6 +1314,13 @@ static void btif_dm_search_devices_evt(tBTA_DM_SEARCH_EVT event,
          }

#if TARGET_FLOSS
          std::vector<uint8_t> property_value;
          for (auto uuid : uuid_iter->second) {
            auto uuid_128bit = uuid.To128BitBE();
            property_value.insert(property_value.end(), uuid_128bit.begin(),
                                  uuid_128bit.end());
          }

          // Floss expects that EIR uuids are immediately reported when the
          // device is found and doesn't wait for the pairing intent.
          //
@@ -1321,8 +1328,8 @@ static void btif_dm_search_devices_evt(tBTA_DM_SEARCH_EVT event,
          // existing UUIDs.
          BTIF_STORAGE_FILL_PROPERTY(
              &properties[num_properties], BT_PROPERTY_UUIDS,
              pairing_cb.num_eir_uuids * Uuid::kNumBytes128,
              pairing_cb.eir_uuids);
              uuid_iter->second.size() * Uuid::kNumBytes128,
              (void*)property_value.data());
          num_properties++;
#endif
        }
+2 −3
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ static const uint8_t btm_msbc_zero_packet[] = {
static const uint8_t btm_msbc_zero_frames[BTM_MSBC_CODE_SIZE] = {0};

/* Define the structure that contains mSBC data */
typedef struct {
struct tBTM_MSBC_INFO {
  size_t packet_size;   /* SCO mSBC packet size supported by lower layer */
  bool check_alignment; /* True to wait for mSBC packet to align */
  size_t buf_size; /* The size of the buffer, determined by the packet_size. */
@@ -286,8 +286,7 @@ typedef struct {

    return &msbc_encode_buf[encode_buf_ro];
  }

} tBTM_MSBC_INFO;
};

static tBTM_MSBC_INFO* msbc_info = nullptr;