Index: build/android/pylib/android_commands.py |
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
index cb72fffba55ae46025c824bdd0e060fa52e658ed..936b3affd52b904b784ce2935e5128a63d901de4 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -350,6 +350,11 @@ class AndroidCommands(object): |
if full_reboot or not self.IsRootEnabled(): |
self._adb.SendCommand('reboot') |
timeout = 300 |
+ retries = 1 |
+ # Wait for the device to disappear. |
+ while retries < 10 and self._device in GetAttachedDevices(): |
frankf
2013/08/09 18:06:29
Ah, makes sense. nit: self.IsOnline()
bulach
2013/08/09 18:17:19
Done.
|
+ time.sleep(1) |
+ retries += 1 |
else: |
self.RestartShell() |
timeout = 120 |