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

Unified Diff: build/android/pylib/device/device_utils.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 | « build/android/pylib/device/adb_wrapper.py ('k') | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index 2389b5191dc3ed639cac4d07e3543eeb45b2681f..f461b2802529176da22f9017485e3d9e2a5746dc 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -69,20 +69,7 @@
Raises:
CommandFailedError if we fail to kill or restart the server.
"""
- def adb_killed():
- status, _ = cmd_helper.GetCmdStatusAndOutput(['pgrep', 'adb'])
- return status != 0 # pgrep didn't find adb, kill-server succeeded
-
- def adb_started():
- status, _ = cmd_helper.GetCmdStatusAndOutput(['pgrep', 'adb'])
- return status == 0 # pgrep found adb, start-server succeeded
-
- adb_wrapper.AdbWrapper.KillServer()
- if not timeout_retry.WaitFor(adb_killed, wait_period=1, max_tries=5):
- raise device_errors.CommandFailedError('Failed to kill adb server')
- adb_wrapper.AdbWrapper.StartServer()
- if not timeout_retry.WaitFor(adb_started, wait_period=1, max_tries=5):
- raise device_errors.CommandFailedError('Failed to start adb server')
+ pylib.android_commands.AndroidCommands().RestartAdbServer()
class DeviceUtils(object):
« no previous file with comments | « build/android/pylib/device/adb_wrapper.py ('k') | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698