mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Remove not allowed services when calling getPrimaryServices.
This commit is contained in:
parent
baa024e362
commit
0eeb56b549
3 changed files with 3 additions and 8 deletions
|
@ -681,6 +681,9 @@ impl BluetoothManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
services_vec.retain(|s| self.allowed_services
|
||||||
|
.get(&device_id)
|
||||||
|
.map_or(false, |uuids| uuids.contains(&s.uuid)));
|
||||||
if services_vec.is_empty() {
|
if services_vec.is_empty() {
|
||||||
return drop(sender.send(Err(BluetoothError::NotFound)));
|
return drop(sender.send(Err(BluetoothError::NotFound)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[blacklisted-services.html]
|
|
||||||
type: testharness
|
|
||||||
[Request for services. Does not return blacklisted service.]
|
|
||||||
expected: FAIL
|
|
|
@ -1,4 +0,0 @@
|
||||||
[no-permission-present-service.html]
|
|
||||||
type: testharness
|
|
||||||
[Request for present service without permission. Reject with NotFoundError.]
|
|
||||||
expected: FAIL
|
|
Loading…
Add table
Add a link
Reference in a new issue