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

Unified Diff: devil/devil/android/device_utils.py

Issue 2856253007: [devil] Revise how EnableRoot waits for the device to come back. (Closed)
Patch Set: Created 3 years, 7 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 | devil/devil/android/device_utils_devicetest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/device_utils.py
diff --git a/devil/devil/android/device_utils.py b/devil/devil/android/device_utils.py
index 99e37520200f38c48bd2cd85478f6859d40fb6dd..51f71949b770c8d1b81cf331751dca8bd2244432 100644
--- a/devil/devil/android/device_utils.py
+++ b/devil/devil/android/device_utils.py
@@ -456,7 +456,15 @@ class DeviceUtils(object):
else:
raise # Failed probably due to some other reason.
- self.WaitUntilFullyBooted()
perezju 2017/05/08 09:03:33 Hmm, I would prefer if the fix is done _within_ Wa
jbudorick 2017/05/08 13:21:26 I think that waiting for the device to go down is
+ def device_online_with_root():
+ try:
+ self.adb.WaitForDevice()
+ return self.GetProp('service.adb.root', cache=False) == '1'
+ except (device_errors.AdbCommandFailedError,
+ device_errors.DeviceUnreachableError):
+ return False
+
+ timeout_retry.WaitFor(device_online_with_root, wait_period=1)
@decorators.WithTimeoutAndRetriesFromInstance()
def IsUserBuild(self, timeout=None, retries=None):
« no previous file with comments | « no previous file | devil/devil/android/device_utils_devicetest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698