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

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

Issue 338353004: [Android] Switch KillAll, StartActivity, and BroadcastIntent to DeviceUtils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: build/android/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index 32121432480103f0e071d4488825ebb6b2fc9011..0d3ead75cec723b6e8b0896b5f529ce228d761ae 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -758,7 +758,7 @@ class AndroidCommands(object):
lines = lines[:-1] + [last_line[:status_pos]]
return (status, lines)
- def KillAll(self, process, signum=9, with_su=False):
+ def KillAll(self, process, signum=signal.SIGKILL, with_su=False):
"""Android version of killall, connected via adb.
Args:
@@ -778,7 +778,8 @@ class AndroidCommands(object):
self.RunShellCommand(cmd)
return len(pids)
- def KillAllBlocking(self, process, timeout_sec):
+ def KillAllBlocking(self, process, timeout_sec, signum=signal.SIGKILL,
+ with_su=False):
"""Blocking version of killall, connected via adb.
This waits until no process matching the corresponding name appears in ps'
@@ -787,11 +788,12 @@ class AndroidCommands(object):
Args:
process: name of the process to kill off
timeout_sec: the timeout in seconds
-
+ signum: same as |KillAll|
+ with_su: same as |KillAll|
Returns:
the number of processes killed
"""
- processes_killed = self.KillAll(process)
+ processes_killed = self.KillAll(process, signum=signum, with_su=with_su)
if processes_killed:
elapsed = 0
wait_period = 0.1

Powered by Google App Engine
This is Rietveld 408576698