| Index: build/android/pylib/device/device_filter.py
|
| diff --git a/build/android/pylib/device/device_filter.py b/build/android/pylib/device/device_filter.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a6dc83a3890d5a390c80da69451e9ec58f489f2c
|
| --- /dev/null
|
| +++ b/build/android/pylib/device/device_filter.py
|
| @@ -0,0 +1,22 @@
|
| +# Copyright 2015 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +from pylib.device import device_blacklist
|
| +
|
| +
|
| +def DefaultFilters():
|
| + return [DeviceFilter, BlacklistFilter()]
|
| +
|
| +
|
| +def BlacklistFilter():
|
| + blacklist = set(device_blacklist.ReadBlacklist())
|
| + def f(adb, _):
|
| + return adb.GetDeviceSerial() not in blacklist
|
| +
|
| + return f
|
| +
|
| +
|
| +def DeviceFilter(_, desc):
|
| + return desc == 'device'
|
| +
|
|
|