mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
Show a dialog for new ADB key if using device.
This commit is contained in:
parent
e6c1de5194
commit
95347d91f0
9 changed files with 152 additions and 109 deletions
|
@ -4,6 +4,7 @@ var syrup = require('syrup')
|
|||
var Promise = require('bluebird')
|
||||
|
||||
var logger = require('../../../util/logger')
|
||||
var grouputil = require('../../../util/grouputil')
|
||||
var wire = require('../../../wire')
|
||||
var wireutil = require('../../../wire/util')
|
||||
var lifecycle = require('../../../util/lifecycle')
|
||||
|
@ -33,14 +34,28 @@ module.exports = syrup.serial()
|
|||
var resolver = Promise.defer()
|
||||
|
||||
function notify() {
|
||||
push.send([
|
||||
solo.channel
|
||||
, wireutil.envelope(new wire.JoinGroupByAdbFingerprintMessage(
|
||||
options.serial
|
||||
, key.fingerprint
|
||||
, key.comment
|
||||
))
|
||||
])
|
||||
group.get()
|
||||
.then(function(currentGroup) {
|
||||
push.send([
|
||||
solo.channel
|
||||
, wireutil.envelope(new wire.JoinGroupByAdbFingerprintMessage(
|
||||
options.serial
|
||||
, key.fingerprint
|
||||
, key.comment
|
||||
, currentGroup.group
|
||||
))
|
||||
])
|
||||
})
|
||||
.catch(grouputil.NoGroupError, function() {
|
||||
push.send([
|
||||
solo.channel
|
||||
, wireutil.envelope(new wire.JoinGroupByAdbFingerprintMessage(
|
||||
options.serial
|
||||
, key.fingerprint
|
||||
, key.comment
|
||||
))
|
||||
])
|
||||
})
|
||||
}
|
||||
|
||||
function joinListener(group, identifier) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue