mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:13:31 +02:00
Fix adb invocations (#202)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
var syrup = require('@devicefarmer/stf-syrup')
|
||||
var DeviceClient = require('@devicefarmer/adbkit/dist/src/adb/DeviceClient').default
|
||||
|
||||
var logger = require('../../../util/logger')
|
||||
var wire = require('../../../wire')
|
||||
@@ -12,6 +13,7 @@ module.exports = syrup.serial()
|
||||
.dependency(require('../support/push'))
|
||||
.dependency(require('../support/adb'))
|
||||
.define(function(options, service, identity, touch, router, push, adb) {
|
||||
var deviceClient = new DeviceClient(adb, options.serial)
|
||||
var log = logger.createLogger('device:plugins:account')
|
||||
|
||||
function checkAccount(type, account) {
|
||||
@@ -281,11 +283,11 @@ module.exports = syrup.serial()
|
||||
])
|
||||
})
|
||||
.catch(function() {
|
||||
return adb.clear(options.serial, 'com.google.android.gsf.login')
|
||||
return deviceClient.clear('com.google.android.gsf.login')
|
||||
.catch(function() {
|
||||
// The package name is different in 2.3, so let's try the old name
|
||||
// if the new name fails.
|
||||
return adb.clear(options.serial, 'com.google.android.gsf')
|
||||
return deviceClient.clear('com.google.android.gsf')
|
||||
})
|
||||
.then(function() {
|
||||
return service.addAccountMenu()
|
||||
|
||||
Reference in New Issue
Block a user