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=unused-argument | 9 # pylint: disable=unused-argument |
10 | 10 |
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1737 def HealthyDevices(cls): | 1737 def HealthyDevices(cls): |
1738 blacklist = device_blacklist.ReadBlacklist() | 1738 blacklist = device_blacklist.ReadBlacklist() |
1739 def blacklisted(adb): | 1739 def blacklisted(adb): |
1740 if adb.GetDeviceSerial() in blacklist: | 1740 if adb.GetDeviceSerial() in blacklist: |
1741 logging.warning('Device %s is blacklisted.', adb.GetDeviceSerial()) | 1741 logging.warning('Device %s is blacklisted.', adb.GetDeviceSerial()) |
1742 return True | 1742 return True |
1743 return False | 1743 return False |
1744 | 1744 |
1745 return [cls(adb) for adb in adb_wrapper.AdbWrapper.Devices() | 1745 return [cls(adb) for adb in adb_wrapper.AdbWrapper.Devices() |
1746 if not blacklisted(adb)] | 1746 if not blacklisted(adb)] |
1747 | |
1748 @classmethod | |
1749 def GetAttachedDevices(cls): | |
jbudorick
2015/06/29 17:56:23
I would prefer to not add this here. Generally, cl
nednguyen
2015/06/29 17:59:12
Ok. But I am curious about this black listing stra
jbudorick
2015/06/29 18:03:45
...?
We don't have a hard-coded list of device ID
nednguyen
2015/06/29 18:14:54
By hard coded, I mean the path to json file bad_de
jbudorick
2015/06/29 18:27:44
Oh, yeah. That part is hard-coded, but I don't thi
nednguyen
2015/06/29 18:42:05
Done.
| |
1750 return [cls(adb) for adb in adb_wrapper.AdbWrapper.Devices()] | |
OLD | NEW |