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

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

Issue 23300003: Allow android pass flags to am start activity (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | tools/telemetry/telemetry/core/chrome/adb_commands.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index 9dc50c36688b6b2dc3830b710f02b02cea66db09..c407ffd692d741cd6f5328ddc932d230d7725c81 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -635,7 +635,8 @@ class AndroidCommands(object):
return processes_killed
def _GetActivityCommand(self, package, activity, wait_for_completion, action,
- category, data, extras, trace_file_name, force_stop):
+ category, data, extras, trace_file_name, force_stop,
+ flags):
"""Creates command to start |package|'s activity on the device.
Args - as for StartActivity
@@ -669,13 +670,15 @@ class AndroidCommands(object):
cmd += ' %s %s' % (key, value)
if trace_file_name:
cmd += ' --start-profiler ' + trace_file_name
+ if flags:
+ cmd += ' -f %s' % flags
return cmd
def StartActivity(self, package, activity, wait_for_completion=False,
action='android.intent.action.VIEW',
category=None, data=None,
extras=None, trace_file_name=None,
- force_stop=False):
+ force_stop=False, flags=None):
"""Starts |package|'s activity on the device.
Args:
@@ -693,14 +696,14 @@ class AndroidCommands(object):
"""
cmd = self._GetActivityCommand(package, activity, wait_for_completion,
action, category, data, extras,
- trace_file_name, force_stop)
+ trace_file_name, force_stop, flags)
self.RunShellCommand(cmd)
def StartActivityTimed(self, package, activity, wait_for_completion=False,
action='android.intent.action.VIEW',
category=None, data=None,
extras=None, trace_file_name=None,
- force_stop=False):
+ force_stop=False, flags=None):
"""Starts |package|'s activity on the device, returning the start time
Args - as for StartActivity
@@ -710,7 +713,7 @@ class AndroidCommands(object):
"""
cmd = self._GetActivityCommand(package, activity, wait_for_completion,
action, category, data, extras,
- trace_file_name, force_stop)
+ trace_file_name, force_stop, flags)
self.StartMonitoringLogcat()
self.RunShellCommand('log starting activity; ' + cmd)
activity_started_re = re.compile('.*starting activity.*')
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/chrome/adb_commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698