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

Commit 356da888 authored by Myles Watson's avatar Myles Watson Committed by Automerger Merge Worker
Browse files

Merge "Bluetooth HIDL 1.0: Log BDADDR source" am: f5212f45

parents 373c6167 f5212f45
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ bool BluetoothAddress::get_local_address(uint8_t* local_addr) {
      const uint8_t zero_bdaddr[kBytes] = {0, 0, 0, 0, 0, 0};
      if ((string_to_bytes(address, local_addr)) &&
          (memcmp(local_addr, zero_bdaddr, kBytes) != 0)) {
        ALOGD("%s: Got Factory BDA %s", __func__, address);
        ALOGD("%s: Got Factory BDA", __func__);
        return true;
      } else {
        ALOGE("%s: Got Invalid BDA '%s' from %s", __func__, address, property);
@@ -78,12 +78,14 @@ bool BluetoothAddress::get_local_address(uint8_t* local_addr) {
  // No BDADDR found in the file. Look for BDA in a factory property.
  if (property_get(FACTORY_BDADDR_PROPERTY, property, NULL) &&
      string_to_bytes(property, local_addr)) {
    ALOGD("%s: Using FACTORY_BDADDR_PROPERTY", __func__);
    return true;
  }

  // No factory BDADDR found. Look for a previously stored BDA.
  if (property_get(PERSIST_BDADDR_PROPERTY, property, NULL) &&
      string_to_bytes(property, local_addr)) {
    ALOGD("%s: Using PERSIST_BDADDR_PROPERTY", __func__);
    return true;
  }