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

Unified Diff: build/android/pylib/android_commands.py

Issue 12250010: [Android] Better handle gtest crashes that generate pexpect.EOF. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « no previous file | build/android/pylib/gtest/test_package.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index 55b3fd6c04e7e306d963dab4ca01070f77e3942f..67275a4d55c4e21cb572d6038191fd1ee9f6d688 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -215,6 +215,15 @@ class AndroidCommands(object):
"""Returns our AdbInterface to avoid us wrapping all its methods."""
return self._adb
+ def IsOnline(self):
+ """Checks whether the device is online.
+
+ Returns:
+ True if device is in 'device' mode, False otherwise.
+ """
+ out = self._adb.SendCommand('get-state')
+ return out.strip() == 'device'
+
def IsRootEnabled(self):
"""Checks if root is enabled on the device."""
root_test_output = self.RunShellCommand('ls /root') or ['']
« no previous file with comments | « no previous file | build/android/pylib/gtest/test_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698