UI support to cleanup bluetooth bonded devices (#757)

Signed-off-by: Jussi Vatjus-Anttila <jussiva@gmail.com>
This commit is contained in:
Jussi Vatjus-Anttila
2024-01-30 01:38:54 +02:00
committed by GitHub
parent c481720dd7
commit 806bfa4087
7 changed files with 61 additions and 0 deletions

View File

@@ -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