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

Commit 21800f99 authored by howardchung's avatar howardchung
Browse files

Floss: Skip storing properties that will not be stored

Some properties are not stored in DB any way. Skip calling
btif_storage_set_remote_device_property to prevent generating unhelpful
error message.

Bug: 273891623
Test: discover locally and verify the error message is gone.
Change-Id: I5d9edc14dffe21502de7633462cc793b375e948f
parent 9562dcab
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -829,8 +829,13 @@ bt_status_t btif_storage_add_remote_device(const RawAddress* remote_bd_addr,
  /* TODO: If writing a property, fails do we go back undo the earlier
   * written properties? */
  for (i = 0; i < num_properties; i++) {
    /* Ignore the RSSI as this is not stored in DB */
    if (properties[i].type == BT_PROPERTY_REMOTE_RSSI) continue;
    /* Ignore properties that are not stored in DB */
    if (properties[i].type == BT_PROPERTY_REMOTE_RSSI ||
        properties[i].type == BT_PROPERTY_REMOTE_IS_COORDINATED_SET_MEMBER ||
        properties[i].type == BT_PROPERTY_REMOTE_ASHA_CAPABILITY ||
        properties[i].type == BT_PROPERTY_REMOTE_ASHA_TRUNCATED_HISYNCID) {
      continue;
    }

    /* address for remote device needs special handling as we also store
     * timestamp */