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

Unified Diff: build/android/pylib/device/adb_wrapper.py

Issue 804033002: Revert of Migrate device_utils.RestartServer to adb_wrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/adb_wrapper.py
diff --git a/build/android/pylib/device/adb_wrapper.py b/build/android/pylib/device/adb_wrapper.py
index 7d761f16a53f1fecfd07badef849ef364853cf12..4006a21d5540611c5e23aa72f2b838293b5efadc 100644
--- a/build/android/pylib/device/adb_wrapper.py
+++ b/build/android/pylib/device/adb_wrapper.py
@@ -56,12 +56,8 @@
# pylint: disable=unused-argument
@classmethod
- def _BuildAdbCmd(cls, args, device_serial, cpu_affinity=None):
- if cpu_affinity is not None:
- cmd = ['taskset', '-c', str(cpu_affinity)]
- else:
- cmd = []
- cmd.append(constants.GetAdbPath())
+ def _BuildAdbCmd(cls, args, device_serial):
+ cmd = [constants.GetAdbPath()]
if device_serial is not None:
cmd.extend(['-s', device_serial])
cmd.extend(args)
@@ -72,9 +68,9 @@
@classmethod
@decorators.WithTimeoutAndRetries
def _RunAdbCmd(cls, args, timeout=None, retries=None, device_serial=None,
- check_error=True, cpu_affinity=None):
+ check_error=True):
status, output = cmd_helper.GetCmdStatusAndOutputWithTimeout(
- cls._BuildAdbCmd(args, device_serial, cpu_affinity=cpu_affinity),
+ cls._BuildAdbCmd(args, device_serial),
timeout_retry.CurrentTimeoutThread().GetRemainingTime())
if status != 0:
raise device_errors.AdbCommandFailedError(
@@ -138,16 +134,6 @@
def __repr__(self):
return '%s(\'%s\')' % (self.__class__.__name__, self)
-
- @classmethod
- def KillServer(cls, timeout=_DEFAULT_TIMEOUT, retries=_DEFAULT_RETRIES):
- cls._RunAdbCmd(['kill-server'], timeout=timeout, retries=retries)
-
- @classmethod
- def StartServer(cls, timeout=_DEFAULT_TIMEOUT, retries=_DEFAULT_RETRIES):
- # CPU affinity is used to reduce adb instability http://crbug.com/268450
- cls._RunAdbCmd(['start-server'], timeout=timeout, retries=retries,
- cpu_affinity=0)
# TODO(craigdh): Determine the filter criteria that should be supported.
@classmethod
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698