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

Unified Diff: build/android/adb_reverse_forwarder.py

Issue 1089273002: Revert of [Android] Remove android_commands uses from build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/enable_asserts.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..1958fdde018c3afc04f91fdeeb840caca4d11730 100755
--- a/build/android/adb_reverse_forwarder.py
+++ b/build/android/adb_reverse_forwarder.py
@@ -11,15 +11,12 @@
to be built.
"""
-import logging
import optparse
import sys
import time
-from pylib import constants
-from pylib import forwarder
-from pylib.device import adb_wrapper
-from pylib.device import device_filter
+from pylib import android_commands
+from pylib import constants, forwarder
from pylib.device import device_utils
from pylib.utils import run_tests_helper
@@ -54,18 +51,17 @@
parser.error('Bad port number')
sys.exit(1)
- devices = adb_wrapper.AdbWrapper.Devices(
- filters=device_filter.DefaultFilters())
+ devices = android_commands.GetAttachedDevices()
if options.device:
- if options.device not in [d.GetDeviceSerial() for d in devices]:
+ if options.device not in devices:
raise Exception('Error: %s not in attached devices %s' % (options.device,
','.join(devices)))
devices = [options.device]
else:
if not devices:
raise Exception('Error: no connected devices')
- logging.info('No device specified. Defaulting to %s', devices[0])
+ print "No device specified. Defaulting to " + devices[0]
device = device_utils.DeviceUtils(devices[0])
constants.SetBuildType(options.build_type)
« no previous file with comments | « build/android/adb_install_apk.py ('k') | build/android/enable_asserts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698