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

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

Issue 404993004: [Android] Switch to DeviceUtils versions of GetMemoryUsageForPid and __str__. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comment from frankf Created 6 years, 5 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/device/device_utils_test.py ('k') | build/android/pylib/gtest/test_package_exe.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/forwarder.py
diff --git a/build/android/pylib/forwarder.py b/build/android/pylib/forwarder.py
index be67d7d4768f9ba5243d1de0e6631a58a1658b57..c5d4f5949234b18aaccdb752813f2918ab99a128 100644
--- a/build/android/pylib/forwarder.py
+++ b/build/android/pylib/forwarder.py
@@ -89,7 +89,7 @@ class Forwarder(object):
instance = Forwarder._GetInstanceLocked(tool)
instance._InitDeviceLocked(device, tool)
- device_serial = device.old_interface.Adb().GetSerialNumber()
+ device_serial = str(device)
redirection_commands = [
['--serial-id=' + device_serial, '--map', str(device),
str(host)] for device, host in port_pairs]
@@ -147,7 +147,7 @@ class Forwarder(object):
with _FileLock(Forwarder._LOCK_PATH):
if not Forwarder._instance:
return
- adb_serial = device.old_interface.Adb().GetSerialNumber()
+ adb_serial = str(device)
if adb_serial not in Forwarder._instance._initialized_devices:
return
port_map = Forwarder._GetInstanceLocked(
@@ -224,7 +224,7 @@ class Forwarder(object):
Note that the global lock must be acquired before calling this method.
"""
instance = Forwarder._GetInstanceLocked(None)
- serial = device.old_interface.Adb().GetSerialNumber()
+ serial = str(device)
serial_with_port = (serial, device_port)
if not serial_with_port in instance._device_to_host_port_map:
logging.error('Trying to unmap non-forwarded port %d' % device_port)
@@ -286,7 +286,7 @@ class Forwarder(object):
tool: Tool class to use to get wrapper, if necessary, for executing the
forwarder (see valgrind_tools.py).
"""
- device_serial = device.old_interface.Adb().GetSerialNumber()
+ device_serial = str(device)
if device_serial in self._initialized_devices:
return
Forwarder._KillDeviceLocked(device, tool)
« no previous file with comments | « build/android/pylib/device/device_utils_test.py ('k') | build/android/pylib/gtest/test_package_exe.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698