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

Unified Diff: devil/devil/android/device_utils.py

Issue 2781953002: Allow atrace over adb tcp/ip (Closed)
Patch Set: Remove GceAdbWrapper creation logic, to allow atrace over tcp-ip Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/device_utils.py
diff --git a/devil/devil/android/device_utils.py b/devil/devil/android/device_utils.py
index 7ba1b51448713b2ae2964d609d3026b76cf3f53f..50f362c3839974e7d296ff08c6cc7669b63b3a85 100644
--- a/devil/devil/android/device_utils.py
+++ b/devil/devil/android/device_utils.py
@@ -39,7 +39,6 @@ from devil.android import logcat_monitor
from devil.android import md5sum
from devil.android.constants import chrome
from devil.android.sdk import adb_wrapper
-from devil.android.sdk import gce_adb_wrapper
from devil.android.sdk import intent
from devil.android.sdk import keyevent
from devil.android.sdk import split_select
@@ -131,7 +130,6 @@ _CURRENT_FOCUS_CRASH_RE = re.compile(
r'\s*mCurrentFocus.*Application (Error|Not Responding): (\S+)}')
_GETPROP_RE = re.compile(r'\[(.*?)\]: \[(.*?)\]')
-_IPV4_ADDRESS_RE = re.compile(r'([0-9]{1,3}\.){3}[0-9]{1,3}\:[0-9]{4,5}')
# Regex to parse the long (-l) output of 'ls' command, c.f.
# https://github.com/landley/toybox/blob/master/toys/posix/ls.c#L446
@@ -254,18 +252,11 @@ def _JoinLines(lines):
return ''.join(s for line in lines for s in (line, '\n'))
-def _IsGceInstance(serial):
- return _IPV4_ADDRESS_RE.match(serial)
-
-
def _CreateAdbWrapper(device):
- if _IsGceInstance(str(device)):
- return gce_adb_wrapper.GceAdbWrapper(str(device))
+ if isinstance(device, adb_wrapper.AdbWrapper):
+ return device
else:
- if isinstance(device, adb_wrapper.AdbWrapper):
- return device
- else:
- return adb_wrapper.AdbWrapper(device)
+ return adb_wrapper.AdbWrapper(device)
def _FormatPartialOutputError(output):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698