From b9430b61179c04c6dacaa60dd2cf4700e7da94af Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Thu, 24 Sep 2020 11:06:29 -0700 Subject: [PATCH] Re-log btif/src/btif_dm::btif_update_remote_properties Towards loggable code Bug: 163134718 Tag: #refactor Test: act.py -tc BleCocTest Test: ble paired 2 phones Change-Id: Ieefd35faee11881a178000e755d2d7fa575f8632 --- btif/src/btif_dm.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/btif/src/btif_dm.cc b/btif/src/btif_dm.cc index 29f1138fb..7420d6013 100644 --- a/btif/src/btif_dm.cc +++ b/btif/src/btif_dm.cc @@ -532,19 +532,20 @@ static void btif_update_remote_properties(const RawAddress& bdaddr, /* class of device */ cod = devclass2uint(dev_class); - BTIF_TRACE_DEBUG("%s cod is 0x%06x", __func__, cod); if (cod == 0) { /* Try to retrieve cod from storage */ - BTIF_TRACE_DEBUG("%s cod is 0, checking cod from storage", __func__); + LOG_VERBOSE("class of device (cod) is unclassified, checking storage"); BTIF_STORAGE_FILL_PROPERTY(&properties[num_properties], BT_PROPERTY_CLASS_OF_DEVICE, sizeof(cod), &cod); status = btif_storage_get_remote_device_property( &bdaddr, &properties[num_properties]); - BTIF_TRACE_DEBUG("%s cod retrieved from storage is 0x%06x", __func__, cod); + LOG_VERBOSE("cod retrieved from storage is 0x%06x", cod); if (cod == 0) { - BTIF_TRACE_DEBUG("%s cod is again 0, set as unclassified", __func__); + LOG_DEBUG("cod from storage is also unclassified"); cod = COD_UNCLASSIFIED; } + } else { + LOG_DEBUG("class of device (cod) is 0x%06x", cod); } BTIF_STORAGE_FILL_PROPERTY(&properties[num_properties], -- 2.11.0