mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:23:28 +02:00
UI support to cleanup bluetooth bonded devices (#757)
Signed-off-by: Jussi Vatjus-Anttila <jussiva@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c481720dd7
commit
806bfa4087
@@ -612,6 +612,21 @@ module.exports = syrup.serial()
|
||||
})
|
||||
}
|
||||
|
||||
plugin.cleanupBondedBluetoothDevices = function() {
|
||||
return runServiceCommand(
|
||||
apk.wire.MessageType.DO_CLEAN_BLUETOOTH_BONDED_DEVICES
|
||||
, new apk.wire.DoCleanBluetoothBondedDevicesRequest()
|
||||
)
|
||||
.timeout(15000)
|
||||
.then(function(data) {
|
||||
var response = apk.wire.DoCleanBluetoothBondedDevicesResponse.decode(data)
|
||||
if (response.success) {
|
||||
return true
|
||||
}
|
||||
throw new Error('Unable to clean bluetooth bonded devices')
|
||||
})
|
||||
}
|
||||
|
||||
plugin.setRingerMode = function(mode) {
|
||||
return runServiceCommand(
|
||||
apk.wire.MessageType.SET_RINGER_MODE
|
||||
|
||||
Reference in New Issue
Block a user