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

Commit 4eeb1694 authored by Chienyuan's avatar Chienyuan
Browse files

Prevent to consolidated empty address

Bug: 223822073
Tag: #refactor
Test: manual
Change-Id: I22480a4eb07b5df61b045b9bc40ae360397d3790
parent 980a4a61
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -952,11 +952,17 @@ void btif_storage_load_consolidate_devices(void) {
        LOG_INFO("found consolidated device %s %s",
                 bonded_devices.devices[i].ToString().c_str(),
                 key.pid_key.identity_addr.ToString().c_str());

        if (bonded_devices.devices[i].IsEmpty() ||
            key.pid_key.identity_addr.IsEmpty()) {
          LOG_WARN("Address is empty! Skip");
        } else {
          consolidated_devices.emplace_back(bonded_devices.devices[i],
                                            key.pid_key.identity_addr);
        }
      }
    }
  }

  bt_property_t adapter_prop = {};
  /* Send the adapter_properties_cb with bonded consolidated device */