Fix miscellaneous typos in the comments or logging.

PiperOrigin-RevId: 454649199
This commit is contained in:
hai007
2022-06-13 10:55:57 -07:00
committed by Copybara-Service
parent a852817f0e
commit 2d4cc75dfa
21 changed files with 35 additions and 35 deletions
@@ -132,12 +132,12 @@ BleAdvertisement::BleAdvertisement(bool fast_advertisement,
break;
default:
NEARBY_LOG(INFO,
"Cannot deserialize BleAdvertisement: uunsupported V1 PCP %d",
"Cannot deserialize BleAdvertisement: unsupported V1 PCP %d",
pcp_);
}
// The next 3 bytes are supposed to be the service_id_hash if not fast
// advertisment.
// advertisement.
if (!fast_advertisement_)
service_id_hash_ = base_input_stream.ReadBytes(kServiceIdHashLength);
@@ -161,12 +161,12 @@ BleAdvertisement::BleAdvertisement(bool fast_advertisement,
fast_advertisement_, expected_endpoint_info_length,
endpoint_info_.size());
// Clear enpoint_id for validity.
// Clear endpoint_id for validity.
endpoint_id_.clear();
return;
}
// The next 6 bytes are the bluetooth mac address if not fast advertisment.
// The next 6 bytes are the bluetooth mac address if not fast advertisement.
if (!fast_advertisement_) {
auto bluetooth_mac_address_bytes =
base_input_stream.ReadBytes(BluetoothUtils::kBluetoothMacAddressLength);
@@ -189,7 +189,7 @@ BleAdvertisement::BleAdvertisement(bool fast_advertisement,
"expected uwbAddress size to be %d bytes, got %" PRIu64,
expected_uwb_address_length, uwb_address_.size());
// Clear enpoint_id for validity.
// Clear endpoint_id for validity.
endpoint_id_.clear();
return;
}
@@ -107,7 +107,7 @@ BluetoothDeviceName::BluetoothDeviceName(
// The next 3 bytes are supposed to be the service_id_hash.
service_id_hash_ = base_input_stream.ReadBytes(kServiceIdHashLength);
// The next 1 byte is field containning WebRtc state.
// The next 1 byte is field containing WebRtc state.
auto field_byte = static_cast<char>(base_input_stream.ReadUint8());
web_rtc_state_ = (field_byte & kWebRtcConnectableFlagBitmask) == 1
? WebRtcState::kConnectable
@@ -129,7 +129,7 @@ BluetoothDeviceName::BluetoothDeviceName(
"endpoint info to be %d bytes, got %" PRIu64,
expected_endpoint_info_length, endpoint_info_.size());
// Clear enpoint_id for validadity.
// Clear endpoint_id for validity.
endpoint_id_.clear();
return;
}
@@ -150,7 +150,7 @@ BluetoothDeviceName::BluetoothDeviceName(
"expected uwbAddress size to be %d bytes, got %" PRIu64,
expected_uwb_address_length, uwb_address_.size());
// Clear enpoint_id for validadity.
// Clear endpoint_id for validity.
endpoint_id_.clear();
return;
}
+1 -1
View File
@@ -223,7 +223,7 @@ bool Ble::StopScanning(const std::string& service_id) {
MutexLock lock(&mutex_);
if (!IsScanningLocked(service_id)) {
NEARBY_LOGS(INFO) << "Can't turn off BLE sacanning because we never "
NEARBY_LOGS(INFO) << "Can't turn off BLE scanning because we never "
"started scanning.";
return false;
}
@@ -145,13 +145,13 @@ class BluetoothClassic {
// Returns true, if discoverability is enabled with TurnOnDiscoverability().
bool IsDiscoverable() const ABSL_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
// Assignes a different name to BT adapter.
// Assigns a different name to BT adapter.
// Returns true if successful. Stores original device name.
bool ModifyDeviceName(const std::string& device_name)
ABSL_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
// Changes current scan mode. This is an implementation of
// Turn<On/Off>Discoveradility() method. Stores original scan mode.
// Turn<On/Off>Discoverability() method. Stores original scan mode.
bool ModifyScanMode(ScanMode scan_mode) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
// Restores original device name (the one before the very first call to