mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +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
@@ -51,4 +51,24 @@ module.exports = syrup.serial()
|
||||
])
|
||||
})
|
||||
})
|
||||
|
||||
router.on(wire.BluetoothCleanBondedMessage, function(channel) {
|
||||
var reply = wireutil.reply(options.serial)
|
||||
log.info('Clean bonded Bluetooth devices')
|
||||
service.cleanupBondedBluetoothDevices()
|
||||
.timeout(30000)
|
||||
.then(function() {
|
||||
push.send([
|
||||
channel
|
||||
, reply.okay()
|
||||
])
|
||||
})
|
||||
.catch(function(err) {
|
||||
log.error('Cleaning Bluetooth bonded devices failed', err.stack)
|
||||
push.send([
|
||||
channel
|
||||
, reply.fail(err.message)
|
||||
])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user