Chromium Code Reviews| Index: telemetry/telemetry/core/android_action_runner.py |
| diff --git a/telemetry/telemetry/core/android_action_runner.py b/telemetry/telemetry/core/android_action_runner.py |
| index 07fdccb71d5f7fbd24fe7cd08058013f44569ac5..905e957988447ac1452a502456d0277b8f5b1343 100644 |
| --- a/telemetry/telemetry/core/android_action_runner.py |
| +++ b/telemetry/telemetry/core/android_action_runner.py |
| @@ -70,8 +70,14 @@ class AndroidActionRunner(object): |
| Args: |
| string: The string to send to the device. |
| """ |
| - self._platform_backend.device.RunShellCommand( |
| - ['input', 'text', string], check_return=True) |
| + # Spaces should be input as keyevents. Pass space character to account for |
|
rnephew (Reviews Here)
2017/04/26 00:28:25
Can this we slightly reworded? I dont think its cu
ssid
2017/04/26 00:36:46
Sorry for not being clear. The input text command
rnephew (Reviews Here)
2017/04/26 01:01:26
I dont think the added code complexity for gating
ssid
2017/04/26 01:12:45
Done.
|
| + # strings with multiple spaces. |
| + words = string.split(' ') |
| + for i in range(0, len(words)): |
| + if i is not 0: |
| + self.InputKeyEvent(keyevent.KEYCODE_SPACE) |
| + self._platform_backend.device.RunShellCommand( |
| + ['input', 'text', words[i]], check_return=True) |
| def InputKeyEvent(self, keycode): |
| """Send a single key input to the device. |
| @@ -105,7 +111,7 @@ class AndroidActionRunner(object): |
| duration: The length of time of the swipe in milliseconds |
| """ |
| cmd = ['input', 'swipe'] |
| - cmd.expand(str(x) for x in (left_start_coord, top_start_coord, |
| + cmd.extend(str(x) for x in (left_start_coord, top_start_coord, |
| left_end_coord, top_end_coord, duration)) |
| self._platform_backend.device.RunShellCommand(cmd, check_return=True) |