Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: build/android/pylib/device/device_utils.py

Issue 221823011: [Android] Change object types from AndroidCommands to DeviceUtils in build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Frank's comments. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698