Chromium Code Reviews| Index: device/bluetooth/bluetooth_adapter_android.cc |
| diff --git a/device/bluetooth/bluetooth_adapter_android.cc b/device/bluetooth/bluetooth_adapter_android.cc |
| index 780ced05e32cc55490b73b81407698c26ecf0bea..995e312191875334528c3a1a7561b7e67ba9de7d 100644 |
| --- a/device/bluetooth/bluetooth_adapter_android.cc |
| +++ b/device/bluetooth/bluetooth_adapter_android.cc |
| @@ -181,7 +181,7 @@ void BluetoothAdapterAndroid::CreateOrUpdateDeviceOnScan( |
| const JavaParamRef<jstring>& address, |
| const JavaParamRef<jobject>& |
| bluetooth_device_wrapper, // Java Type: bluetoothDeviceWrapper |
| - const JavaParamRef<jobject>& |
| + const JavaParamRef<jobjectArray>& |
| advertised_uuids) { // Java Type: List<ParcelUuid> |
| std::string device_address = ConvertJavaStringToUTF8(env, address); |
| DevicesMap::const_iterator iter = devices_.find(device_address); |
| @@ -201,10 +201,10 @@ void BluetoothAdapterAndroid::CreateOrUpdateDeviceOnScan( |
| BluetoothDeviceAndroid* device_android = |
| static_cast<BluetoothDeviceAndroid*>(iter->second); |
| device_android->UpdateTimestamp(); |
| - if (device_android->UpdateAdvertisedUUIDs(advertised_uuids)) { |
| - FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, |
| - DeviceChanged(this, device_android)); |
| - } |
| + device_android->UpdateAdvertisedUUIDs(advertised_uuids); |
| + |
| + FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, |
|
scheib
2016/08/05 18:49:31
Only notify if UUIDs are different.
ortuno
2016/08/05 23:00:16
This specific change has little to do with the adv
scheib
2016/08/06 00:21:41
OK, thanks for explanation -- Document on adapter:
ortuno
2016/08/08 22:56:39
Added a comment to explicitly mention that DeviceC
|
| + DeviceChanged(this, device_android)); |
| } |
| } |