Don’t give a scary error about not being able to run on Android if there’s no Android device connected.

This commit is contained in:
Ian Fischer
2015-10-07 15:29:13 -07:00
parent fbb1f866d4
commit 72cc4d6fde

View File

@@ -230,13 +230,15 @@ class AndroidDevice extends _Device {
_adbPath = _getAdbPath();
_hasAdb = _checkForAdb();
// Checking for lollipop only needs to be done if we are starting an
// app, but it has an important side effect, which is to discard any
// progress messages if the adb server is restarted.
_hasValidAndroid = _checkForLollipopOrLater();
if (isConnected()) {
// Checking for lollipop only needs to be done if we are starting an
// app, but it has an important side effect, which is to discard any
// progress messages if the adb server is restarted.
_hasValidAndroid = _checkForLollipopOrLater();
if (!_hasAdb || !_hasValidAndroid) {
_logging.severe('Unable to run on Android.');
if (!_hasAdb || !_hasValidAndroid) {
_logging.severe('Unable to run on Android.');
}
}
}