| Index: tools/telemetry/telemetry/core/platform/android_action_runner.py
|
| diff --git a/tools/telemetry/telemetry/core/platform/android_action_runner.py b/tools/telemetry/telemetry/core/platform/android_action_runner.py
|
| index 1e87445b85fd6f42a9ba6a9f1bf1f6b265d065f5..c2f79b481a5760c13707fd4e665c8c9a5ada08b0 100644
|
| --- a/tools/telemetry/telemetry/core/platform/android_action_runner.py
|
| +++ b/tools/telemetry/telemetry/core/platform/android_action_runner.py
|
| @@ -67,7 +67,7 @@
|
| Args:
|
| string: The string to send to the device.
|
| """
|
| - self._platform_backend.device.RunShellCommand('input text %s' % string)
|
| + self._platform_backend.adb.RunShellCommand('input text %s' % string)
|
|
|
| def InputKeyEvent(self, key):
|
| """Send a single key input to the device.
|
| @@ -75,7 +75,7 @@
|
| Args:
|
| key: A key code number or name that will be sent to the device
|
| """
|
| - self._platform_backend.device.SendKeyEvent(key)
|
| + self._platform_backend.adb.RunShellCommand('input keyevent %s' % key)
|
|
|
| def InputTap(self, x_coord, y_coord):
|
| """Perform a tap input at the given coordinates.
|
| @@ -84,8 +84,8 @@
|
| x_coord: The x coordinate of the tap event.
|
| y_coord: The y coordinate of the tap event.
|
| """
|
| - self._platform_backend.device.RunShellCommand(
|
| - 'input tap %s %s' % (x_coord, y_coord))
|
| + self._platform_backend.adb.RunShellCommand('input tap %s %s' % (x_coord,
|
| + y_coord))
|
|
|
| def InputSwipe(self, left_start_coord, top_start_coord, left_end_coord,
|
| top_end_coord, duration):
|
| @@ -98,14 +98,14 @@
|
| top_end_coord: The vertical ending coordinate of the gesture
|
| duration: The length of time of the swipe in milliseconds
|
| """
|
| - self._platform_backend.device.RunShellCommand(
|
| + self._platform_backend.adb.RunShellCommand(
|
| 'input swipe %s %s %s %s %s' % (left_start_coord, top_start_coord,
|
| left_end_coord, top_end_coord,
|
| duration))
|
|
|
| def InputPress(self):
|
| """Perform a press input."""
|
| - self._platform_backend.device.RunShellCommand('input press')
|
| + self._platform_backend.adb.RunShellCommand('input press')
|
|
|
| def InputRoll(self, dx, dy):
|
| """Perform a roll input. This sends a simple zero-pressure move event.
|
| @@ -114,7 +114,7 @@
|
| dx: Change in the x coordinate due to move.
|
| dy: Change in the y coordinate due to move.
|
| """
|
| - self._platform_backend.device.RunShellCommand('input roll %s %s' % (dx, dy))
|
| + self._platform_backend.adb.RunShellCommand('input roll %s %s' % (dx, dy))
|
|
|
| def EnsureScreenOn(self):
|
| """If device screen is off, turn screen on.
|
| @@ -173,7 +173,7 @@
|
| return not self._platform_backend.IsScreenLocked()
|
|
|
| if self._platform_backend.IsScreenLocked():
|
| - self._platform_backend.device.SendKeyEvent(82)
|
| + self._platform_backend.adb.RunShellCommand('input keyevent 82')
|
| else:
|
| logging.warning('Screen not locked when expected.')
|
| return
|
| @@ -181,4 +181,4 @@
|
| util.WaitFor(is_screen_unlocked, 5)
|
|
|
| def _ToggleScreenOn(self):
|
| - self._platform_backend.device.SendKeyEvent(26)
|
| + self._platform_backend.adb.RunShellCommand('input keyevent 26')
|
|
|