1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 18:29:17 +02:00

Allow master volume to be always muted.

This commit is contained in:
Simo Kinnunen 2017-09-22 17:07:45 +09:00
parent cc5d7580c2
commit 2351025f6f
5 changed files with 66 additions and 14 deletions

View file

@ -115,8 +115,20 @@ module.exports.builder = function(yargs) {
, type: 'boolean'
})
.option('mute-master', {
describe: 'Whether to mute master volume when devices are being used.'
, type: 'boolean'
describe: 'Whether to mute master volume.'
, choices: ['always', 'inuse', 'never']
, default: 'never'
, coerce: val => {
if (val === true) {
return 'inuse' // For backwards compatibility.
}
if (val === false) {
return 'never' // For backwards compatibility.
}
return val
}
})
.option('port', {
alias: ['p', 'poorxy-port']
@ -265,9 +277,9 @@ module.exports.handler = function(argv) {
, '--adb-host', argv.adbHost
, '--adb-port', argv.adbPort
, '--vnc-initial-size', argv.vncInitialSize.join('x')
, '--mute-master', argv.muteMaster
]
.concat(argv.allowRemote ? ['--allow-remote'] : [])
.concat(argv.muteMaster ? ['--mute-master'] : [])
.concat(argv.lockRotation ? ['--lock-rotation'] : [])
.concat(!argv.cleanup ? ['--no-cleanup'] : [])
.concat(argv.serial))