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

Commit 95024c01 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 am: 356da888...

Merge "Bluetooth HIDL 1.0: Log BDADDR source" am: f5212f45 am: 356da888 am: 531236e1 am: 9868117f am: 04a8c0d2

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2595997



Change-Id: Id4a88cd6cd13bc80208d82c4660909f9377e9e19
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9d8a879e 04a8c0d2
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;
  }