Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Provides a variety of device interactions based on adb. | 5 """Provides a variety of device interactions based on adb. |
| 6 | 6 |
| 7 Eventually, this will be based on adb_wrapper. | 7 Eventually, this will be based on adb_wrapper. |
| 8 """ | 8 """ |
| 9 # pylint: disable=W0613 | 9 # pylint: disable=W0613 |
| 10 | 10 |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 726 value: A string containing the value to set to the property on the | 726 value: A string containing the value to set to the property on the |
| 727 device. | 727 device. |
| 728 timeout: timeout in seconds | 728 timeout: timeout in seconds |
| 729 retries: number of retries | 729 retries: number of retries |
| 730 | 730 |
| 731 Raises: | 731 Raises: |
| 732 CommandTimeoutError on timeout. | 732 CommandTimeoutError on timeout. |
| 733 """ | 733 """ |
| 734 self.old_interface.system_properties[property_name] = value | 734 self.old_interface.system_properties[property_name] = value |
| 735 | 735 |
| 736 def GetABI(self): | |
|
jbudorick
2014/10/14 14:51:52
Public functions in DeviceUtils should expose time
Fabrice (no longer in Chrome)
2014/10/14 16:26:03
Done.
| |
| 737 """Gets the device main ABI. | |
| 738 """ | |
|
jbudorick
2014/10/14 14:51:52
nit: document Returns: & Raises: (should be the sa
Fabrice (no longer in Chrome)
2014/10/14 16:26:03
Done.
| |
| 739 return self.GetProp('ro.product.cpu.abi') | |
| 740 | |
| 736 @decorators.WithTimeoutAndRetriesFromInstance() | 741 @decorators.WithTimeoutAndRetriesFromInstance() |
| 737 def GetPids(self, process_name, timeout=None, retries=None): | 742 def GetPids(self, process_name, timeout=None, retries=None): |
| 738 """Returns the PIDs of processes with the given name. | 743 """Returns the PIDs of processes with the given name. |
| 739 | 744 |
| 740 Note that the |process_name| is often the package name. | 745 Note that the |process_name| is often the package name. |
| 741 | 746 |
| 742 Args: | 747 Args: |
| 743 process_name: A string containing the process name to get the PIDs for. | 748 process_name: A string containing the process name to get the PIDs for. |
| 744 timeout: timeout in seconds | 749 timeout: timeout in seconds |
| 745 retries: number of retries | 750 retries: number of retries |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 862 Returns: | 867 Returns: |
| 863 A Parallelizer operating over |devices|. | 868 A Parallelizer operating over |devices|. |
| 864 """ | 869 """ |
| 865 if not devices or len(devices) == 0: | 870 if not devices or len(devices) == 0: |
| 866 devices = pylib.android_commands.GetAttachedDevices() | 871 devices = pylib.android_commands.GetAttachedDevices() |
| 867 parallelizer_type = (parallelizer.Parallelizer if async | 872 parallelizer_type = (parallelizer.Parallelizer if async |
| 868 else parallelizer.SyncParallelizer) | 873 else parallelizer.SyncParallelizer) |
| 869 return parallelizer_type([ | 874 return parallelizer_type([ |
| 870 d if isinstance(d, DeviceUtils) else DeviceUtils(d) | 875 d if isinstance(d, DeviceUtils) else DeviceUtils(d) |
| 871 for d in devices]) | 876 for d in devices]) |
| 872 | |
| OLD | NEW |