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

Unified Diff: device/bluetooth/bluetooth_classic_device_mac.mm

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: Use enum and change to EXPECT_EQ 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: device/bluetooth/bluetooth_classic_device_mac.mm
diff --git a/device/bluetooth/bluetooth_classic_device_mac.mm b/device/bluetooth/bluetooth_classic_device_mac.mm
index 985596ecfc59873e8797f52d9690489597abda9c..dfa8a7e87a0860a3b399c2a9626be3ac14c1ae66 100644
--- a/device/bluetooth/bluetooth_classic_device_mac.mm
+++ b/device/bluetooth/bluetooth_classic_device_mac.mm
@@ -145,13 +145,13 @@ BluetoothDevice::UUIDList BluetoothClassicDeviceMac::GetUUIDs() const {
return uuids;
}
-int16_t BluetoothClassicDeviceMac::GetInquiryRSSI() const {
- return kUnknownPower;
+int8_t BluetoothClassicDeviceMac::GetInquiryRSSI() const {
+ return kUnknownRSSI;
}
-int16_t BluetoothClassicDeviceMac::GetInquiryTxPower() const {
+int8_t BluetoothClassicDeviceMac::GetInquiryTxPower() const {
NOTIMPLEMENTED();
- return kUnknownPower;
+ return kUnknownTxPower;
}
bool BluetoothClassicDeviceMac::ExpectingPinCode() const {
@@ -181,7 +181,7 @@ void BluetoothClassicDeviceMac::GetConnectionInfo(
// The API guarantees that +127 is returned in case the RSSI is not readable:
// http://goo.gl/bpURYv
if (connection_info.rssi == 127)
- connection_info.rssi = kUnknownPower;
+ connection_info.rssi = kUnknownRSSI;
connection_info.transmit_power =
GetHostTransmitPower(kReadCurrentTransmitPowerLevel);
@@ -266,7 +266,7 @@ int BluetoothClassicDeviceMac::GetHostTransmitPower(
inType:
outTransmitPowerLevel:);
if (![controller respondsToSelector:selector])
- return kUnknownPower;
+ return kUnknownTxPower;
BluetoothHCITransmitPowerLevel power_level;
IOReturn result =
@@ -274,7 +274,7 @@ int BluetoothClassicDeviceMac::GetHostTransmitPower(
inType:power_level_type
outTransmitPowerLevel:&power_level];
if (result != kIOReturnSuccess)
- return kUnknownPower;
+ return kUnknownTxPower;
return power_level;
}

Powered by Google App Engine
This is Rietveld 408576698