OLD | NEW |
---|---|
(Empty) | |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 """ | |
6 Provides a variety of device interactions based on adb. | |
7 | |
8 Eventually, this will be based on adb_wrapper. | |
9 """ | |
10 | |
11 import pylib.android_commands | |
12 from pylib.device import adb_wrapper | |
13 | |
craigdh
2014/04/09 15:55:02
two lines after imports, I believe?
| |
14 def GetAVDs(): | |
15 return pylib.android_commands.GetAVDs() | |
16 | |
17 | |
18 class DeviceUtils(object): | |
19 | |
20 def __init__(self, device): | |
21 self.old_interface = None | |
22 if isinstance(device, str): | |
23 self.old_interface = pylib.android_commands.AndroidCommands(device) | |
24 elif isinstance(device, adb_wrapper.AdbWrapper): | |
25 self.old_interface = pylib.android_commands.AndroidCommands(str(device)) | |
26 elif isinstance(device, pylib.android_commands.AndroidCommands): | |
27 self.old_interface = device | |
28 elif not device: | |
29 self.old_interface = pylib.android_commands.AndroidCommands() | |
30 | |
OLD | NEW |