OSDN Git Service

Remove unnecesary warning on expected parsing failure
authorChris Manton <cmanton@google.com>
Thu, 3 Sep 2020 21:08:58 +0000 (14:08 -0700)
committerChris Manton <cmanton@google.com>
Tue, 22 Sep 2020 20:21:03 +0000 (20:21 +0000)
Towards loggable code

Bug: 163134718
Tag: #refactor
Test: acts -tc BleCocTest
Test: ble paired 2 phones
Change-Id: I2310c69cf6b40e494d9aa191da590a8ea89c7e16

btif/src/btif_config.cc

index 0c5e149..bc77a10 100644 (file)
@@ -623,11 +623,10 @@ std::vector<RawAddress> btif_config_get_paired_devices() {
   result.reserve(names.size());
   for (const auto& name : names) {
     RawAddress addr = {};
-    if (!RawAddress::FromString(name, addr)) {
-      LOG(WARNING) << __func__ << ": " << name << " is not a valid address";
-      continue;
+    // Gather up known devices from configuration section names
+    if (RawAddress::FromString(name, addr)) {
+      result.emplace_back(addr);
     }
-    result.emplace_back(addr);
   }
   return result;
 }