mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 12:53:21 +02:00
Fix adb invocations (#202)
This commit is contained in:
@@ -3,19 +3,21 @@ var syrup = require('@devicefarmer/stf-syrup')
|
||||
var logger = require('../../../util/logger')
|
||||
var wire = require('../../../wire')
|
||||
var wireutil = require('../../../wire/util')
|
||||
var DeviceClient = require('@devicefarmer/adbkit/dist/src/adb/DeviceClient').default
|
||||
|
||||
module.exports = syrup.serial()
|
||||
.dependency(require('../support/router'))
|
||||
.dependency(require('../support/push'))
|
||||
.dependency(require('../support/adb'))
|
||||
.define(function(options, router, push, adb) {
|
||||
var deviceClient = new DeviceClient(adb, options.serial)
|
||||
var log = logger.createLogger('device:plugins:store')
|
||||
|
||||
router.on(wire.StoreOpenMessage, function(channel) {
|
||||
log.info('Opening Play Store')
|
||||
|
||||
var reply = wireutil.reply(options.serial)
|
||||
adb.startActivity(options.serial, {
|
||||
deviceClient.startActivity({
|
||||
action: 'android.intent.action.MAIN'
|
||||
, component: 'com.android.vending/.AssetBrowserActivity'
|
||||
// FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
|
||||
|
||||
Reference in New Issue
Block a user