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:
parent
cc5d7580c2
commit
2351025f6f
5 changed files with 66 additions and 14 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue