diff --git a/lib/devices/android/adb.js b/lib/devices/android/adb.js index 46badc2c7..6903199d8 100644 --- a/lib/devices/android/adb.js +++ b/lib/devices/android/adb.js @@ -939,6 +939,4 @@ ADB.prototype.sendTelnetCommand = function(command, cb) { }; -module.exports = function(opts, android) { - return new ADB(opts, android); -}; +module.exports = ADB; diff --git a/lib/devices/android/android.js b/lib/devices/android/android.js index d8bc3a7eb..1edd8811f 100644 --- a/lib/devices/android/android.js +++ b/lib/devices/android/android.js @@ -4,7 +4,7 @@ var errors = require('../../server/errors.js') , exec = require('child_process').exec , path = require('path') , fs = require('fs') - , adb = require('./adb.js') + , ADB = require('./adb.js') , helpers = require('../../helpers.js') , getTempPath = helpers.getTempPath , _ = require('underscore') @@ -14,7 +14,7 @@ var errors = require('../../server/errors.js') , helperJarPath = path.resolve(__dirname, 'helpers') , async = require('async') , androidController = require('./android-controller.js') - , uiautomator = require('./uiautomator.js') + , UiAutomator = require('./uiautomator.js') , UnknownError = errors.UnknownError; var Android = function(opts) { @@ -146,8 +146,8 @@ Android.prototype.start = function(cb, onDie) { if (this.adb === null) { // Pass Android opts and Android ref to adb. - this.adb = adb(this.opts, this); - this.uiautomator = uiautomator(this.adb, this.opts); + this.adb = new ADB(this.opts); + this.uiautomator = new UiAutomator(this.adb, this.opts); this.startAppium(onLaunch, onExit); } else { logger.error("Tried to start ADB when we already have one running!"); diff --git a/lib/devices/android/chrome.js b/lib/devices/android/chrome.js index b03c9db95..ca0bf1cd1 100644 --- a/lib/devices/android/chrome.js +++ b/lib/devices/android/chrome.js @@ -9,7 +9,7 @@ var Android = require('./android.js').Android , async = require('async') , through = require('through') , isWindows = require('../../helpers.js').isWindows() - , adb = require('./adb.js'); + , ADB = require('./adb.js'); var ChromeAndroid = function(opts) { this.initialize(opts); @@ -30,7 +30,7 @@ var ChromeAndroid = function(opts) { _.extend(ChromeAndroid.prototype, Android.prototype); ChromeAndroid.prototype.start = function(cb, onDie) { - this.adb = new adb(this.opts); + this.adb = new ADB(this.opts); this.onDie = onDie; this.onChromedriverStart = null; async.waterfall([ diff --git a/lib/devices/android/selendroid.js b/lib/devices/android/selendroid.js index 3e691f9d0..62203b932 100644 --- a/lib/devices/android/selendroid.js +++ b/lib/devices/android/selendroid.js @@ -1,6 +1,6 @@ "use strict"; -var adb = require('./adb.js') +var ADB = require('./adb.js') , _ = require('underscore') , deviceCommon = require('../common.js') , proxyTo = deviceCommon.proxyTo @@ -34,7 +34,7 @@ Selendroid.prototype.start = function(cb) { logger.info("Starting selendroid server"); var opts = _.clone(this.opts); opts.devicePort = 8080; // selendroid listens on 8080 on the device - this.adb = new adb(opts); + this.adb = new ADB(opts); async.waterfall([ function(cb) { this.ensureServerExists(cb); }.bind(this),