Chromium Code Reviews| Index: ios/chrome/common/physical_web/physical_web_scanner.mm |
| diff --git a/ios/chrome/common/physical_web/physical_web_scanner.mm b/ios/chrome/common/physical_web/physical_web_scanner.mm |
| index d35a6689a3aa44caa3fe2e9b864945c8a3628aa6..f07a82ed53c1308f103d01d737cbc0c886330549 100644 |
| --- a/ios/chrome/common/physical_web/physical_web_scanner.mm |
| +++ b/ios/chrome/common/physical_web/physical_web_scanner.mm |
| @@ -163,6 +163,9 @@ enum BeaconType { |
| } |
| - (NSArray*)devices { |
| + if (![self bluetoothEnabled]) { |
| + return [NSArray array]; |
| + } |
| return [devices_ sortedArrayUsingComparator:^(id obj1, id obj2) { |
|
Olivier
2016/11/17 09:04:36
Should we clear devices_ ?
mattreynolds
2016/11/18 00:03:25
When onLostDetectionEnabled_==NO, I think we shoul
|
| PhysicalWebDevice* device1 = obj1; |
| PhysicalWebDevice* device2 = obj2; |