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

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

Issue 338353004: [Android] Switch KillAll, StartActivity, and BroadcastIntent to DeviceUtils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: appeasing windows Created 6 years, 6 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/flag_changer.py ('k') | build/android/pylib/gtest/test_package_apk.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 aec572c9d42c0720882381101d83489877a6d61e..f0ddb2e5a6f683e412c2ca0db8c3db0479967d3a 100644
--- a/build/android/pylib/forwarder.py
+++ b/build/android/pylib/forwarder.py
@@ -12,6 +12,7 @@ import psutil
from pylib import cmd_helper
from pylib import constants
from pylib import valgrind_tools
+from pylib.device import device_errors
# TODO(jbudorick) Remove once telemetry gets switched over.
import pylib.android_commands
@@ -340,9 +341,10 @@ class Forwarder(object):
# sure that the old version of device_forwarder (not supporting
# 'kill-server') is not running on the bots anymore.
timeout_sec = 5
- processes_killed = device.old_interface.KillAllBlocking(
- 'device_forwarder', timeout_sec)
- if not processes_killed:
+ try:
+ device.KillAll(
+ 'device_forwarder', blocking=True, timeout=timeout_sec)
+ except device_errors.CommandFailedError:
pids = device.old_interface.ExtractPid('device_forwarder')
if pids:
- raise Exception('Timed out while killing device_forwarder')
+ raise
« no previous file with comments | « build/android/pylib/flag_changer.py ('k') | build/android/pylib/gtest/test_package_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698