Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: build/android/pylib/ports.py

Issue 221823011: [Android] Change object types from AndroidCommands to DeviceUtils in build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/perf/thermal_throttle.py ('k') | build/android/pylib/screenshot.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « build/android/pylib/perf/thermal_throttle.py ('k') | build/android/pylib/screenshot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698