Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: components/arc/bluetooth/arc_bluetooth_bridge.cc

Issue 1941923002: bluetooth: Return int8_t and use -128 for unknown tx power. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Fix extensions tests Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/arc/bluetooth/arc_bluetooth_bridge.cc
diff --git a/components/arc/bluetooth/arc_bluetooth_bridge.cc b/components/arc/bluetooth/arc_bluetooth_bridge.cc
index f34a400da1107943fc4ce5f38ec56d737d1c3d08..8877c9f922f1760a3e07b92c47f03462d5604dfd 100644
--- a/components/arc/bluetooth/arc_bluetooth_bridge.cc
+++ b/components/arc/bluetooth/arc_bluetooth_bridge.cc
@@ -573,9 +573,11 @@ ArcBluetoothBridge::GetDeviceProperties(mojom::BluetoothPropertyType type,
}
if (type == mojom::BluetoothPropertyType::ALL ||
type == mojom::BluetoothPropertyType::REMOTE_RSSI) {
- mojom::BluetoothPropertyPtr btp = mojom::BluetoothProperty::New();
- btp->set_remote_rssi(device->GetInquiryRSSI());
- properties.push_back(std::move(btp));
+ if (device->GetInquiryRSSI()) {
+ mojom::BluetoothPropertyPtr btp = mojom::BluetoothProperty::New();
+ btp->set_remote_rssi(device->GetInquiryRSSI().value());
+ properties.push_back(std::move(btp));
+ }
}
// TODO(smbarber): Add remote version info

Powered by Google App Engine
This is Rietveld 408576698