Index: build/android/pylib/android_commands.py |
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
index 48116b88ffd8e7e7a889ea679ff99e55569e702c..d54743824a26ab31635e0f5f81de19f6ae105fd5 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -114,6 +114,17 @@ def GetAttachedDevices(): |
return devices |
+def GetAttachedOfflineDevices(): |
+ """Returns a list of attached, offline android devices. |
+ |
+ Returns: List of devices with status 'offline'. |
+ """ |
+ re_device = re.compile('^([a-zA-Z0-9_:.-]+)\toffline$', re.MULTILINE) |
+ devices = re_device.findall(cmd_helper.GetCmdOutput([constants.ADB_PATH, |
frankf
2013/07/16 17:51:19
just return, no intermediate var
navabi
2013/07/16 19:01:16
Done.
|
+ 'devices'])) |
+ return devices |
+ |
+ |
def IsDeviceAttached(device): |
frankf
2013/07/16 17:51:19
Add a doc that this only cares about online device
navabi
2013/07/16 19:01:16
Done.
|
return device in GetAttachedDevices() |