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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7e299ac3ddeda882a947093aa81be4b955c3b836 |
| --- /dev/null |
| +++ b/build/android/pylib/device/device_utils.py |
| @@ -0,0 +1,30 @@ |
| +# Copyright 2014 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. |
| + |
| +""" |
| +Provides a variety of device interactions based on adb. |
| + |
| +Eventually, this will be based on adb_wrapper. |
| +""" |
| + |
| +import pylib.android_commands |
| +from pylib.device import adb_wrapper |
| + |
|
craigdh
2014/04/09 15:55:02
two lines after imports, I believe?
|
| +def GetAVDs(): |
| + return pylib.android_commands.GetAVDs() |
| + |
| + |
| +class DeviceUtils(object): |
| + |
| + def __init__(self, device): |
| + self.old_interface = None |
| + if isinstance(device, str): |
| + self.old_interface = pylib.android_commands.AndroidCommands(device) |
| + elif isinstance(device, adb_wrapper.AdbWrapper): |
| + self.old_interface = pylib.android_commands.AndroidCommands(str(device)) |
| + elif isinstance(device, pylib.android_commands.AndroidCommands): |
| + self.old_interface = device |
| + elif not device: |
| + self.old_interface = pylib.android_commands.AndroidCommands() |
| + |