| Index: device/bluetooth/bluetooth_adapter.cc
|
| diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc
|
| index d9a24f05ad8c696a5d3ba29aa5564ad0155e77b6..1f5922292d0db2dc0230d289b4cd5252c0858914 100644
|
| --- a/device/bluetooth/bluetooth_adapter.cc
|
| +++ b/device/bluetooth/bluetooth_adapter.cc
|
| @@ -73,7 +73,12 @@ BluetoothDevice* BluetoothAdapter::GetDevice(const std::string& address) {
|
|
|
| const BluetoothDevice* BluetoothAdapter::GetDevice(
|
| const std::string& address) const {
|
| - DevicesMap::const_iterator iter = devices_.find(address);
|
| + std::string canonicalized_address =
|
| + BluetoothDevice::CanonicalizeAddress(address);
|
| + if (canonicalized_address.empty())
|
| + return NULL;
|
| +
|
| + DevicesMap::const_iterator iter = devices_.find(canonicalized_address);
|
| if (iter != devices_.end())
|
| return iter->second;
|
|
|
|
|