Chromium Code Reviews| Index: build/android/pylib/device/device_utils.py |
| diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py |
| index 8a8de22519f3d69bc93681657494ed076eaeba05..c3711dd7f360f306f5f4a387ca94cbef2acdb8ec 100644 |
| --- a/build/android/pylib/device/device_utils.py |
| +++ b/build/android/pylib/device/device_utils.py |
| @@ -60,12 +60,16 @@ class DeviceUtils(object): |
| operation should be retried on failure if no explicit |
| value is provided. |
| """ |
| + self.adb = None |
| self.old_interface = None |
| if isinstance(device, basestring): |
| + self.adb = adb_wrapper.AdbWrapper(device) |
| self.old_interface = pylib.android_commands.AndroidCommands(device) |
| elif isinstance(device, adb_wrapper.AdbWrapper): |
| + self.adb = device |
| self.old_interface = pylib.android_commands.AndroidCommands(str(device)) |
| elif isinstance(device, pylib.android_commands.AndroidCommands): |
| + self.adb = adb_wrapper.AdbWrapper(device.GetDevice()) |
| self.old_interface = device |
| elif not device: |
| self.old_interface = pylib.android_commands.AndroidCommands() |
| @@ -701,7 +705,14 @@ class DeviceUtils(object): |
| Raises: |
| CommandTimeoutError on timeout. |
| """ |
| + is_persist_property = property_name.startswith('persist.') |
| + if is_persist_property: |
| + self._RunShellCommandImpl('stop') |
|
tonyg
2014/08/15 17:19:43
Seems like this should be in system_properties, no
jbudorick
2014/08/15 17:41:47
It could be, although I'm plotting to get rid of s
|
| self.old_interface.system_properties[property_name] = value |
| + if is_persist_property: |
| + self.adb.WaitForDevice() |
| + self._RunShellCommandImpl('start') |
| + self.old_interface.WaitForDevicePm() |
| @decorators.WithTimeoutAndRetriesFromInstance() |
| def GetPids(self, process_name, timeout=None, retries=None): |