| 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.*')
|
|
|