mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Bluetooth HIDL 1.0: Log BDADDR source" am: f5212f4528 am: 356da88842
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2595997 Change-Id: I3835eb2236e3a6102c50d048acc0d0fbe71d0de5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user