Index: build/android/pylib/ports.py |
diff --git a/build/android/pylib/ports.py b/build/android/pylib/ports.py |
index bae4d5ca8d10f6a47445f2d0aa1477d7962cf2de..88b7cb2065c697253066bb3fe62451d596cb4543 100644 |
--- a/build/android/pylib/ports.py |
+++ b/build/android/pylib/ports.py |
@@ -101,11 +101,11 @@ def IsHostPortUsed(host_port): |
return False |
-def IsDevicePortUsed(adb, device_port, state=''): |
+def IsDevicePortUsed(device, device_port, state=''): |
"""Checks whether the specified device port is used or not. |
Args: |
- adb: Instance of AndroidCommands for talking to the device. |
+ device: A DeviceUtils instance. |
device_port: Port on device we want to check. |
state: String of the specified state. Default is empty string, which |
means any state. |
@@ -114,7 +114,8 @@ def IsDevicePortUsed(adb, device_port, state=''): |
True if the port on device is already used, otherwise returns False. |
""" |
base_url = '127.0.0.1:%d' % device_port |
- netstat_results = adb.RunShellCommand('netstat', log_result=False) |
+ netstat_results = device.old_interface.RunShellCommand( |
+ 'netstat', log_result=False) |
for single_connect in netstat_results: |
# Column 3 is the local address which we want to check with. |
connect_results = single_connect.split() |