mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:23:28 +02:00
options to disable bluetooth and/or clean bonded (paired) devices (#758)
Signed-off-by: Jussi Vatjus-Anttila <jussiva@gmail.com>
This commit is contained in:
committed by
GitHub
parent
806bfa4087
commit
a6b5f18941
@@ -704,6 +704,20 @@ module.exports = syrup.serial()
|
||||
})
|
||||
}
|
||||
|
||||
plugin.cleanBluetoothBonds = function() {
|
||||
return runServiceCommand(
|
||||
apk.wire.MessageType.DO_CLEAN_BLUETOOTH_BONDED_DEVICES
|
||||
, new apk.wire.DoCleanBluetoothBondedDevicesRequest()
|
||||
)
|
||||
.timeout(10000)
|
||||
.then(function(data) {
|
||||
var response = apk.wire.DoCleanBluetoothBondedDevicesResponse.decode(data)
|
||||
if (!response.success) {
|
||||
throw new Error('Unable to clean Bluetooth bonded devices')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
plugin.getBluetoothStatus = function() {
|
||||
return runServiceCommand(
|
||||
apk.wire.MessageType.GET_BLUETOOTH_STATUS
|
||||
|
||||
Reference in New Issue
Block a user