зеркало из https://github.com/mozilla/pjs.git
Bug 728995 - DeviceManagerADB should support TCP/IP r=wlach
This commit is contained in:
Родитель
3d2cb480a8
Коммит
0d5609bd1e
|
@ -25,11 +25,17 @@ class DeviceManagerADB(DeviceManager):
|
|||
packageName = 'org.mozilla.fennec_'
|
||||
self.Init(packageName)
|
||||
|
||||
def __del__(self):
|
||||
if self.host:
|
||||
self.disconnectRemoteADB()
|
||||
|
||||
def Init(self, packageName):
|
||||
# Initialization code that may fail: Catch exceptions here to allow
|
||||
# successful initialization even if, for example, adb is not installed.
|
||||
try:
|
||||
self.verifyADB()
|
||||
if self.host:
|
||||
self.connectRemoteADB()
|
||||
self.verifyRunAs(packageName)
|
||||
except:
|
||||
self.useRunAs = False
|
||||
|
@ -104,6 +110,12 @@ class DeviceManagerADB(DeviceManager):
|
|||
|
||||
return None
|
||||
|
||||
def connectRemoteADB(self):
|
||||
self.checkCmd(["connect", self.host + ":" + str(self.port)])
|
||||
|
||||
def disconnectRemoteADB(self):
|
||||
self.checkCmd(["disconnect", self.host + ":" + str(self.port)])
|
||||
|
||||
# external function
|
||||
# returns:
|
||||
# success: True
|
||||
|
|
Загрузка…
Ссылка в новой задаче