AI 143754: SdkManager: list unknown AVDs and why they didn't load.

BUG=1703143

Automated import of CL 143754
This commit is contained in:
Raphael Moll
2009-03-31 12:39:09 -07:00
committed by The Android Open Source Project
parent 1a43129cfa
commit e529390a9c
2 changed files with 181 additions and 45 deletions

View File

@@ -459,11 +459,30 @@ class Main {
mSdkLog.printf(" Sdcard: %s\n", sdcard);
}
}
// Are there some unused AVDs?
List<AvdInfo> badAvds = avdManager.getUnavailableAvdList();
if (badAvds == null || badAvds.size() == 0) {
return;
}
mSdkLog.printf("\nThe following Android Virtual Devices are no longer available:\n");
boolean needSeparator = false;
for (AvdInfo info : badAvds) {
if (needSeparator) {
mSdkLog.printf("---------\n");
}
mSdkLog.printf(" Name: %s\n", info.getName() == null ? "--" : info.getName());
mSdkLog.printf(" Path: %s\n", info.getPath() == null ? "--" : info.getPath());
mSdkLog.printf(" Error: %s\n", info.getError() == null ? "--" : info.getError());
needSeparator = true;
}
} catch (AndroidLocationException e) {
errorAndExit(e.getMessage());
}
}
/**
* Creates a new AVD. This is a text based creation with command line prompt.
*/