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

Unified Diff: build/android/adb_reverse_forwarder.py

Issue 1101603002: [Android] Rework device filtering and add DeviceUtils.HealthyDevices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: perezju comments Created 5 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/adb_install_apk.py ('k') | build/android/host_heartbeat.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/adb_reverse_forwarder.py
diff --git a/build/android/adb_reverse_forwarder.py b/build/android/adb_reverse_forwarder.py
index b2da6a75809c9413d99dbd84aee8cc9ce818f1a8..6cae0cf5c8375e0cec73b8ab603d34bf45729b04 100755
--- a/build/android/adb_reverse_forwarder.py
+++ b/build/android/adb_reverse_forwarder.py
@@ -19,7 +19,6 @@ import time
from pylib import constants
from pylib import forwarder
from pylib.device import adb_wrapper
-from pylib.device import device_filter
from pylib.device import device_utils
from pylib.utils import run_tests_helper
@@ -54,11 +53,10 @@ def main(argv):
parser.error('Bad port number')
sys.exit(1)
- devices = adb_wrapper.AdbWrapper.Devices(
- filters=device_filter.DefaultFilters())
+ devices = device_utils.DeviceUtils.HealthyDevices()
if options.device:
- if options.device not in [d.GetDeviceSerial() for d in devices]:
+ if options.device not in [str(d) for d in devices]:
raise Exception('Error: %s not in attached devices %s' % (options.device,
','.join(devices)))
devices = [options.device]
@@ -67,7 +65,7 @@ def main(argv):
raise Exception('Error: no connected devices')
logging.info('No device specified. Defaulting to %s', devices[0])
- device = device_utils.DeviceUtils(devices[0])
+ device = devices[0]
constants.SetBuildType(options.build_type)
try:
forwarder.Forwarder.Map(port_pairs, device)
« no previous file with comments | « build/android/adb_install_apk.py ('k') | build/android/host_heartbeat.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698