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

Unified Diff: device/bluetooth/bluetooth_adapter_android.cc

Issue 1842223003: Remove outdated devices from Android device chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test for ItemChooserDialog Created 4 years, 8 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_adapter_android.cc
diff --git a/device/bluetooth/bluetooth_adapter_android.cc b/device/bluetooth/bluetooth_adapter_android.cc
index b3891a47ef983409435a2421d014e4bdd5230a57..db13d6cb0d700dee730c3ad02d3f62a912af17cd 100644
--- a/device/bluetooth/bluetooth_adapter_android.cc
+++ b/device/bluetooth/bluetooth_adapter_android.cc
@@ -168,6 +168,7 @@ void BluetoothAdapterAndroid::CreateOrUpdateDeviceOnScan(
BluetoothDeviceAndroid* device_android =
BluetoothDeviceAndroid::Create(this, bluetooth_device_wrapper);
device_android->UpdateAdvertisedUUIDs(advertised_uuids);
+ device_android->UpdateTimestamp();
devices_.add(device_address, scoped_ptr<BluetoothDevice>(device_android));
FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
DeviceAdded(this, device_android));
@@ -175,6 +176,7 @@ void BluetoothAdapterAndroid::CreateOrUpdateDeviceOnScan(
// Existing device.
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));

Powered by Google App Engine
This is Rietveld 408576698