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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/device/adb_wrapper_test.py ('k') | build/android/pylib/device_settings.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..aa42aff3cdb1f72ae029ee53a93cc49a4b0f1694
--- /dev/null
+++ b/build/android/pylib/device/device_utils.py
@@ -0,0 +1,31 @@
+# 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
+
+
+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()
+
« no previous file with comments | « build/android/pylib/device/adb_wrapper_test.py ('k') | build/android/pylib/device_settings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698